B
Bo Hansson
I'm working with a Word VBA application in Office 2000 under Windows XP.
I may have spoiled the Outlook configuration when I tried to import contacts
from an earlier computer setup with Office 2003. At that occasion I got some
messages about incompatibility and nothing was imported. However, I can add
new contacts without problems. But when I try to use GetAddress in my Word
VBA code (or use the Insert Address command in the Word application) there
is nothing returned from the address fields of the chosen contact.
The following sample code (Word VBA) returns all fields, except for the last
three (
"<PR_STREET_ADDRESS>", "<PR_POSTAL_CODE>" and "<PR_LOCALITY>").
They are all empty.
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
------------------------------------------------
I have also tried to repair the pst file (SCANPST), and I have reinstalled
the complete Office 2000 - but I have not been able to get rid of the
problem.
Please, all Outlook experts, what should I do?
BosseH
I may have spoiled the Outlook configuration when I tried to import contacts
from an earlier computer setup with Office 2003. At that occasion I got some
messages about incompatibility and nothing was imported. However, I can add
new contacts without problems. But when I try to use GetAddress in my Word
VBA code (or use the Insert Address command in the Word application) there
is nothing returned from the address fields of the chosen contact.
The following sample code (Word VBA) returns all fields, except for the last
three (
"<PR_STREET_ADDRESS>", "<PR_POSTAL_CODE>" and "<PR_LOCALITY>").
They are all empty.
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
------------------------------------------------
I have also tried to repair the pst file (SCANPST), and I have reinstalled
the complete Office 2000 - but I have not been able to get rid of the
problem.
Please, all Outlook experts, what should I do?
BosseH