Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Remove United States of America from inside adress in Word 200

In Control Panel

--

Graham Mayor - Word MVP

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


Diana wrote:
Thanks, that helps. Where is the regional setting in Windows?

"Graham Mayor" wrote:

If your regional setting in Windows is set to United States, the
United States shouldn't be added to inserted PostalAddress fields,
however see http://www.gmayor.com/Macrobutton.htm in conjunction
with the following modified macro:


Public Sub InsertAddressFromOutlook()
Dim strCode As String
Dim strCountry As String
Dim strAddress As String
Dim iDoubleCR As Integer

'Set up the formatting codes in strCode
strCode = "{PR_DISPLAY_NAME_PREFIX }PR_GIVEN_NAME PR_SURNAME"
& vbCr strCode = strCode & "PR_COMPANY_NAME" & vbCr
strCode = strCode & "PR_POSTAL_ADDRESS" & vbCr
strCountry = "PR_COUNTRY"

'Let the user choose the name in Outlook
strAddress = Application.GetAddress("", _
strCode, False, 1, , , True, True)
If strAddress = "" Then
MsgBox "User cancelled or no address listed", , "Cancel"
Exit Sub
End If
strCountry = Application.GetAddress("", strCountry, _
False, 2, , , True, True)

'Strip away the final "United States Of America", if any
If InStr(strCountry, "United States") Then
strAddress = Left(strAddress, Len(strAddress) - 25)
End If

'Eliminate blank lines by looking for two carriage returns in a row
iDoubleCR = InStr(strAddress, vbCr & vbCr)
While iDoubleCR 0
strAddress = Left(strAddress, iDoubleCR - 1) & _
Mid(strAddress, iDoubleCR + 1)
iDoubleCR = InStr(strAddress, vbCr & vbCr)
Wend
Selection.TypeText strAddress
End Sub


--

Graham Mayor - Word MVP

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



Diana wrote:
I am using the letter wizard in Word to enter contacts from Outlook
into a saved letterhead file. It's adding United States of America
at the end of the address, even though I can't find that anywhere in
the contact or the letter wizard. Is there a way to remove that,
without having to do it every time I use the wizard?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I email my letter from Microsoft Word 2003 to America Rick Microsoft Word Help 1 December 7th 06 10:33 PM
stop putting United States of America at the bottom of an address Escape Microsoft Word Help 2 August 3rd 06 09:08 AM
"United States of America" included when printing envelopes Norman Microsoft Word Help 1 July 17th 06 03:47 AM
Outlook 2003 automatic insertion of "United States of America" Stuart C. Microsoft Word Help 1 June 20th 05 07:42 PM
How to remove dialog box that states Microsoft Office is now inst. mya Microsoft Word Help 1 April 21st 05 02:41 PM


All times are GMT +1. The time now is 05:18 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"