Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

GetAddress arguments do not return values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bo Hansson - 03 Apr 2006 14:51 GMT
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
Graham Mayor - 04 Apr 2006 06:52 GMT
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

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Today I've learnt about GetAddress, thanks to kind people in this
> discussion group!
[quoted text clipped - 9 lines]
>
> /BosseH
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.