Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
How do I email my letter from Microsoft Word 2003 to America | Microsoft Word Help | |||
stop putting United States of America at the bottom of an address | Microsoft Word Help | |||
"United States of America" included when printing envelopes | Microsoft Word Help | |||
Outlook 2003 automatic insertion of "United States of America" | Microsoft Word Help | |||
How to remove dialog box that states Microsoft Office is now inst. | Microsoft Word Help |