B
Bo Hansson
I'm working with a Word VBA application in Office 2000 under Windows XP.
The code below returns all fields, except for the last three (
"<PR_STREET_ADDRESS>", "<PR_POSTAL_CODE>" and "<PR_LOCALITY>").
They are all empty.
I have tried a lot of suggested ways to find the cause of the problem, see
the earlier thread "Importing Outlook Contacts data into Word VBA?" , but
with no success.
Now I have to get more ideas from the exellent solution providers of this
discussion group. You are all welcome!
My code:
Dim strAddress, strCode, strFnamn, strEnamn, strTel, strMobil, strEpost,
strGata, strPostNr, strOrt As String
strFnamn = "<PR_GIVEN_NAME>"
strEnamn = "<PR_SURNAME>"
strTel = "<PR_HOME_TELEPHONE_NUMBER>"
strMobil = "<PR_CELLULAR_TELEPHONE_NUMBER>"
strEpost = "<PR_EMAIL_ADDRESS>"
strGata = "<PR_STREET_ADDRESS>"
strPostNr = "<PR_POSTAL_CODE>"
strOrt = "<PR_LOCALITY>"
strCode = strFnamn & "$1" & strEnamn & "$2" & strTel & "$3" & strMobil &
"$4" & strEpost _
& "$5" & strGata & "$6" & strPostNr & "$7" & strOrt
strAddress = Application.GetAddress(AddressProperties:=strCode,
DisplaySelectDialog:=1)
MsgBox strAddress
The code below returns all fields, except for the last three (
"<PR_STREET_ADDRESS>", "<PR_POSTAL_CODE>" and "<PR_LOCALITY>").
They are all empty.
I have tried a lot of suggested ways to find the cause of the problem, see
the earlier thread "Importing Outlook Contacts data into Word VBA?" , but
with no success.
Now I have to get more ideas from the exellent solution providers of this
discussion group. You are all welcome!
My code:
Dim strAddress, strCode, strFnamn, strEnamn, strTel, strMobil, strEpost,
strGata, strPostNr, strOrt As String
strFnamn = "<PR_GIVEN_NAME>"
strEnamn = "<PR_SURNAME>"
strTel = "<PR_HOME_TELEPHONE_NUMBER>"
strMobil = "<PR_CELLULAR_TELEPHONE_NUMBER>"
strEpost = "<PR_EMAIL_ADDRESS>"
strGata = "<PR_STREET_ADDRESS>"
strPostNr = "<PR_POSTAL_CODE>"
strOrt = "<PR_LOCALITY>"
strCode = strFnamn & "$1" & strEnamn & "$2" & strTel & "$3" & strMobil &
"$4" & strEpost _
& "$5" & strGata & "$6" & strPostNr & "$7" & strOrt
strAddress = Application.GetAddress(AddressProperties:=strCode,
DisplaySelectDialog:=1)
MsgBox strAddress