Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Eugene, Oregon, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Extracting Address From A Letter (Word 2000 SR-1)

    When you create a letter in Word and then activate the Labels/Envelope dialog box, Word typically finds the address in your letter document.

    Is there any way to 'find' this address within VBA?

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Extracting Address From A Letter (Word 2000 SR-1)

    Yes, there is.

    Set dlg = Dialogs(wdDialogToolsEnvelopesAndLabels)

    With dlg
    .DefaultTab = wdDialogToolsEnvelopesAndLabelsTabEnvelopes
    .EnvOmitReturn = True
    .ExtractAddress = True
    bla, bla, bla
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Eugene, Oregon, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Extracting Address From A Letter (Word 2000 SR-1)

    Thanks Kevin. The .ExtractAddress command allows me to get the address in the dialog box, but ultimately, I would like to get the address in a string variable without displaying the built-in dialog box. In addition, even if I display the built-in dialog box, I seem to only capture the first line of the address (from the .AddrText property of the dialog box).

    Any further ideas? Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •