I am trying to build an access process to add contacts to an outlook folder. I have linked the folder and can add, update and delete records. But not all of the fields are showing up correctly in outlook. Namely the address field.
I have added a test contact and added an address, went back into access and mimicked the data perfectly, but no address shows up in outlook.
Is there something that needs to be done in order for addresses to show up in outlook?
Here is my data:
First Last Title Company Department Office Post Office Box Address City State Zip/Postal Code Country/Region Phone
John Test superduper 500 west T Test City MI 99999 United States of America 1 800 555 5555
Bill Test Awesomedawesome 600 East G Test City MI 99999 United States of America 1 800 666 6666
The first record is outlook added, the lower one is access added.
Here is the view I get in outlook:
I ended up going the code route:
Dim olCI As Outlook.ContactItem
Set olCI = mf.Items.Add(olContactItem)
With olCI
.FullName = Trim(rs!Name)
.Title = Trim(rs!Salutation)
.JobTitle = Trim(rs!Title)
.Email1Address = Trim(rs!Email)
.CompanyName = Trim(rs!AccountName)
.BusinessAddressStreet = Trim(rs!MailingStreet)
.BusinessAddressCity = Trim(rs!MailingCity)
.BusinessAddressPostalCode = Trim(rs!MailingZipCode)
.BusinessAddressCountry = Trim(rs!MailingCountry)
.BusinessFaxNumber = Trim(rs!Fax)
.BusinessTelephoneNumber = Trim(rs!Phone)
.OtherTelephoneNumber = Trim(rs!OtherPhone)
.BusinessHomePage = ""
.MobileTelephoneNumber = Trim(rs!MobilePhone)
.Birthday = IIf(IsNull(rs!Birthdate), 0, rs!Birthdate)
.Department = rs!Department
.Save
End With
Related
I have created an author user in surreal DB like this:
CREATE author:shivam SET
name.first = 'Shivam',
name.last = 'Sahil',
name.full = string::join(' ', name.first, name.last),
age = 23,
admin = true,
signup_at = time::now()
;
Now I want to query all the authors, but when I do:
SELECT * FROM author;
I get 0 results.
Is it supposed to be queried in some other way?
What you did should work well as you can see here
Don't forget to start your server with something like this for example
surreal start --log info --user root --pass root memory
and log-in as in my above screenshot with:
surreal sql --conn http://localhost:8000 --ns yoloswag --db compabie
Then, your create query and select should work well!
Alternatively, you can give a try to that video or documentation's quick start.
Creating another author like this is properly fetched afterwards.
CREATE author:123 SET
name.first = 'bob',
name.last = 'hoh',
name.full = string::join(' ', name.first, name.last),
age = 30,
admin = false,
signup_at = time::now()
;
Don't forget that 123 is supposed to be a unique ID (a string should be fine tho).
I'm creating a code to download some material information, by first asking SAP to get a certain plant information. Then I'm switching the drill down to the Business Area (BA) and lastly I have to Drilldown each BA by Material Code.
Where I'm running into issues is when I'm making the Drilldown by Material Code (the second "for"), since each of the plants has a different number of Business Areas. Could you tell how can I know the number of rows of the first Business Area table?
The code also has to export the Material Code data to an excel sheet, but I didn't include that in the following code.
This is the code I'm using:
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
'Startup
session.findById("wnd[0]").maximize
'Variables
filepath = "30-06-2022" 'Poner la fecha del dia de descarga
CurrentDate = "07/2022" 'Poner el mes del analisis
PlantList = Array(NameOfAllThePlants)
'Search for MCBA
session.findById("wnd[0]/tbar[0]/okcd").text = "MCBA"
session.findById("wnd[0]").sendVKey 0
For i = 0 To 23 Step 1
'MCBA Parameters
session.findById("wnd[0]/usr/ctxtSL_WERKS-LOW").text = PlantList(i)
session.findById("wnd[0]/usr/ctxtSL_SPMON-LOW").text = "07/2022"
session.findById("wnd[0]/usr/ctxtSL_SPMON-HIGH").text = "07/2022"
session.findById("wnd[0]/usr/ctxtSL_SPMON-HIGH").setFocus
session.findById("wnd[0]/usr/ctxtSL_SPMON-HIGH").caretPosition = 7
session.findById("wnd[0]/tbar[1]/btn[8]").press
'Analysis Currency
session.findById("wnd[0]/tbar[1]/btn[31]").press
session.findById("wnd[1]/usr/sub:SAPLSPO4:0300/ctxtSVALD-VALUE[0,21]").text = "usd"
session.findById("wnd[1]/usr/sub:SAPLSPO4:0300/ctxtSVALD-VALUE[2,21]").text = "07/04/2022"
session.findById("wnd[1]/usr/sub:SAPLSPO4:0300/ctxtSVALD-VALUE[2,21]").setFocus
session.findById("wnd[1]/usr/sub:SAPLSPO4:0300/ctxtSVALD-VALUE[2,21]").caretPosition = 10
session.findById("wnd[1]/tbar[0]/btn[0]").press
'Change drilldown to Business Area
session.findById("wnd[0]/tbar[1]/btn[7]").press
session.findById("wnd[1]/tbar[0]/btn[0]").press
For j = 0 To LastRowOfTheBusinessAreaTable
'Drilldown by MaterialCode
session.findById("wnd[0]/usr/lbl[1,"&Cstr(j+6)&"]").setFocus
session.findById("wnd[0]/usr/lbl[1,"&Cstr(j+6)&"]").caretPosition = 3
session.findById("wnd[0]").sendVKey 8
session.findById("wnd[1]/usr/sub:SAPLMCS2:0201/radLMCS2-MRKKZ[4,0]").select
session.findById("wnd[1]/usr/sub:SAPLMCS2:0201/radLMCS2-MRKKZ[4,0]").setFocus
session.findById("wnd[1]/tbar[0]/btn[0]").press
'back to Business Area view
session.findById("wnd[0]/tbar[0]/btn[3]").press
session.findById("wnd[0]/usr/lbl[1,7]").setFocus
session.findById("wnd[0]/usr/lbl[1,7]").caretPosition = 7
session.findById("wnd[0]").sendVKey 8
'session.findById("wnd[1]/usr/sub:SAPLMCS2:0201/radLMCS2-MRKKZ[4,0]").setFocus
session.findById("wnd[1]/tbar[0]/btn[0]").press
Next
'back
session.findById("wnd[0]/tbar[0]/btn[3]").press
'don't save
session.findById("wnd[1]/usr/btnSPOP-OPTION2").press
I use a standard process to create a calendar with the library iCal.NET (see example below). The calendar is created (I can see it when I check the variable "output" - see below). But I face issues when I try to use my page to create a subscription, either in Google Agenda or in Outlook. In Outlook 365, I get the message "check your URL" ; In Google Agenda and with Outlook WebApp (I have seen that there were possibly identification issues with Internet calendars in Outlook), the calendar seems to work (I see the address in the agendas on the left), but the events are not imported.
The calendar is created via an aspx page with a querystring : something like https://mysite/mysubdirectory/mypage.aspx?ref=12345).
With Outlook, I have tried both webcal://mysite/mysubdirectory/mypage.aspx?ref=12345 and webcals://mysite/mysubdirectory/mypage.aspx?ref=12345
I am using Visual Studio 2022 and the latest version of ical.NET (4.2.0), my target is Framework 4.7,
What am I doing wrong ?
Dim dthor As DataTable = dstry.Tables.Add("trydate")
dthor.Columns.Add("ref", Type.GetType("System.Int32"))
dthor.Columns.Add("debut", Type.GetType("System.DateTime"))
dthor.Columns.Add("fin", Type.GetType("System.DateTime"))
dthor.Columns.Add("detail", Type.GetType("System.String"))
Dim drow As DataRow
drow = dthor.NewRow
drow("debut") = # 01/05/2022 08:00#
drow("fin") = # 01/05/2022 10:00#
drow("detail") = "Essai 1 éà"
drow("ref") = 1234
dthor.Rows.Add(drow)
drow = dthor.NewRow
drow("debut") = # 01/05/2022 11:00#
drow("fin") = # 01/05/2022 12:30#
drow("detail") = "Essai 2 èéà"
drow("ref") = 1235
dthor.Rows.Add(drow)
Dim iCal As New Ical.Net.Calendar()
iCal.AddTimeZone(New VTimeZone("Europe/Paris"))
iCal.ProductId = "my code"
iCal.Method = "PUBLISH"
iCal.Scale = "GREGORIAN"
For Each dr As DataRow In dthor.Rows
Dim evt As New CalendarEvent
With evt
.DtStart = New CalDateTime(CDate(dr("debut")))
.DtEnd = New CalDateTime(CDate(dr("fin")))
.Summary = dr("detail")
.Uid = dr("ref")
.DtStamp = New CalDateTime(DateTime.Now)
End With
iCal.Events.Add(evt)
Next
Dim serializer As New CalendarSerializer()
Dim output As String = serializer.SerializeToString(iCal)
Response.ContentType = "text/calendar"
Response.Write(output)
Response.End()
End Sub
I would like to find a section name from an INI file with only a unique key name using ADODB.Stream instead of scripting.FileSystemObject with Charset "_autodetect_all"
My ini file :
...
...
...
[Area.104]
Title=Central North America
Local=Scenery\NAMC Layer=104
Active=TRUE
Required=FALSE
[Area.105]
Local=Scenery\NAME
Layer=105
Active=TRUE
Required=FALSE
Title=Eastern North America
[Area.106]
Local=Scenery\NAMW
Layer=106
Title=Western North America
Active=TRUE
Required=FALSE
...
...
...
How can I get section name [Area.105] from unique key Title=Eastern North
America ??? Keys are in random order. Thanks
Here is the answer which I have got from another website (thank you very much omen999)
This code works perfectly with ADODB
Dim TitleName
TitleName = Array("Central North America")
Set IniStream=CreateObject("ADODB.Stream")
IniStream.Open
Inistream.Charset="_autodetect_all"
IniStream.LoadFromFile "Area.ini"
IniFile=IniStream.ReadText
PosEnd=InStrRev(IniFile,"]",InStrRev(IniFile,TitleName(0)))
PosStart=InStrRev(IniFile,"[",PosEnd)+1
Wscript.Echo Mid(IniFile,PosStart,PosEnd-PosStart)
IniStream.Close
I am using the Universe U2.net toolkit to update the record in universe database. We have so far no issue with update to non multi value field with the following code
Open_Again:
Try
db_connectionU2 = openConnU2()
db_connectionU2.Open()
Catch ex As Exception
GoTo Open_Again
End Try
Dim cmdWIP As New U2Command
'cmdWIP = New U2Command("DELETE FROM MPS", db_connectionU2)
cmdWIP = New U2Command("UPDATE POH SET EPOS=#FLAG where PONO='C11447'", db_connectionU2)
cmdWIP = New U2Command("UPDATE CURCVRD F8=#F8 where F0='51747*1'", db_connectionU2)
cmdWIP.Parameters.Add(New U2Parameter("#F8", U2Type.VarChar)).Value = "t"
cmdWIP.Connection = db_connectionU2
cmdWIP.ExecuteNonQuery()
cmdWIP.Dispose()
cmdWIP = Nothing
db_connectionU2.Close()
db_connectionU2.Dispose()
db_connectionU2 = Nothing
but it having the problem when we try to add in to multivalue field. It's return the error " Column being update from single to multi is illegal. Please see the red box for the message and the value we are writing in.
Please click below to see the screenshot
enter image description here
Thank you
You need to look at the DICT of that file and make sure your entries are marked and MultiValued and have an Multi-Value Association.
Here is an example from the HS.SALES demo account.
>LIST DICT CUSTOMER
DICT CUSTOMER 03:56:47pm 01 Dec 2016 Page 1
Type &
Field......... Field. Field........ Conversion.. Column......... Output Depth &
Name.......... Number Definition... Code........ Heading........ Format Assoc..
CUSTID D 0 P(0N) Customer ID 10R S
#ID D 0 CUSTOMER 10L S
SAL D 1 Salutation 5T S
FNAME D 2 First Name 12T S
LNAME D 3 Last Name 16T S
COMPANY D 4 Company Name 20T S
ADDR1 D 5 Address line 1 30T S
ADDR2 D 6 Address line 2 30T S
CITY D 7 City 12T S
STATE D 8 P(2A) State 2L S
MCU
ZIP D 9 P(5N) Zip 5L S
PHONE D 10 P("("3N")"3N Telephone 13R S
-4N)
PRODID D 11 P(1A4N) Product 5L M ORDER
S
SER_NUM D 12 P(6N) Serial# 6L M ORDER
S
Notice how PRODID has "M ORDERS" after is (the is drops to the next line thanks to the 80 char size of my terminal. This tells Universe that it is a multivalued field with an Association called ORDERS. This allows the SQL interpreter to know how to update things.
It gets a bit more complicated and I would recommend looking up HS.ADMIN and specifically HS.SCRIB for tips on formatting things for non-pick style consumption. Check the UVodbc guide for more info on that.