S
Shane Rockey
I've created a macro that uses the getaddress method to
start a letter and insert fields. If I use the following
code
addr = Application.GetAddress()
Selection.TypeText Text:="" & addr
it works fine but I can't select fields other than the
mailing address to print.
To fix this I used the follwing
strToName = Application.GetAddress(Name:="", _
AddressProperties:="<PR_DISPLAY_NAME>",
UseAutoText:=False, _
Displayselectdialog:=1)
addr = Application.GetAddress(Name:=strToName,
Displayselectdialog:=0)
salute = Application.GetAddress(Name:=strToName, _
AddressProperties:="<PR_GIVEN_NAME>",
UseAutoText:=False, _
Displayselectdialog:=0)
Selection.TypeText Text:="" & addr
(and then I continue using the salute and StrToName
fields in the rest of the letter)
However, using this latter code, If I select a contact
without an email or fax number I get a error saying
microsoft exchange could not recognize the name. As long
as I use a contact with an email or fax number it works
fine.
Anyone have any idea how to fix this.
start a letter and insert fields. If I use the following
code
addr = Application.GetAddress()
Selection.TypeText Text:="" & addr
it works fine but I can't select fields other than the
mailing address to print.
To fix this I used the follwing
strToName = Application.GetAddress(Name:="", _
AddressProperties:="<PR_DISPLAY_NAME>",
UseAutoText:=False, _
Displayselectdialog:=1)
addr = Application.GetAddress(Name:=strToName,
Displayselectdialog:=0)
salute = Application.GetAddress(Name:=strToName, _
AddressProperties:="<PR_GIVEN_NAME>",
UseAutoText:=False, _
Displayselectdialog:=0)
Selection.TypeText Text:="" & addr
(and then I continue using the salute and StrToName
fields in the rest of the letter)
However, using this latter code, If I select a contact
without an email or fax number I get a error saying
microsoft exchange could not recognize the name. As long
as I use a contact with an email or fax number it works
fine.
Anyone have any idea how to fix this.