Word 2007 GetAddress Problem

L

Legal Learning

I have this code in Word 2003 and it works great. In Word 2007 it works
except the addresses to not populate to the fields, thus do not get to the
final document.

It steps-through just fine and the variables are the correct value when
doing that. However, it will not populate to the fields on the dialogs
anymore.

HELP! I have this code in a lot of firms and will need to get this
corrected pretty fast. Any help is GREATLY appreciated.

DialogReturn = rcpDisplayName1 =
Application.GetAddress(AddressProperties:="<PR_DISPLAY_NAME>",
DisplaySelectDialog:=1)

rcpCompanyName1 =
Application.GetAddress(AddressProperties:="<PR_COMPANY_NAME>",
DisplaySelectDialog:=2)

rcpFirstName1 =
Application.GetAddress(AddressProperties:="<PR_GIVEN_NAME>",
DisplaySelectDialog:=2)

rcpLastName1 = Application.GetAddress(AddressProperties:="<PR_SURNAME>",
DisplaySelectDialog:=2)

rcpBusFaxNo1 =
Application.GetAddress(AddressProperties:="<PR_BUSINESS_FAX_NUMBER>",
DisplaySelectDialog:=2)

If rcpCompanyName1 = "" Then

strAddress1 = "<PR_POSTAL_ADDRESS>"

Else

strAddress1 = "<PR_COMPANY_NAME>" & vbCr & "<PR_POSTAL_ADDRESS>"

End If

rcpAddress1 = Application.GetAddress(AddressProperties:=strAddress1,
DisplaySelectDialog:=2)

EVERYTHING UNTIL THIS POINT SEEMS TO BE FINE. WHEN STEPPING THROUGH THE
CODE, THE VARIABLES ARE THE CORRECT VALUES????



'populate fields in frmLetter - Here is where the trouble starts



If DialogReturn = False Then
frmContacts.txtName1.Value = rcpFirstName1 & " " & rcpLastName1
frmContacts.txtC1.Value = rcpAddress1

mReturn10 = True
Else
mReturn10 = False
End If



Thanks so very much for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top