GetAddress arguments do not return values

B

Bo Hansson

Today I've learnt about GetAddress, thanks to kind people in this discussion
group!
However, when trying to apply my new knowledge, I cannot return any data
with the
following arguments:

<PR_STREET_ADDRESS>
<PR_POSTAL_CODE>
<PR_LOCALITY>

Why not?

/BosseH
 
G

Graham Mayor

They work fine here eg

Public Sub InsertNameFromOutlook()
Dim strCode As String
Dim strAddress As String

'*********************
'Set up the formatting codes in strCode
strCode = "<PR_POSTAL_CODE>"
'*********************

'Let the user choose the name in Outlook
strAddress = Application.GetAddress("", strCode, _
False, 1, , , True, True)
'Insert the name at the current insertion point
If ActiveDocument.ProtectionType <> wdNoProtection Then
bProtected = True
ActiveDocument.Unprotect
ActiveDocument.FormFields("NameOfFormfield").Result = _
strAddress
Else
Selection.TypeText strAddress
End If
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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