Results 1 to 4 of 4
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print Envelope (Word 2000/SR-3)

    Hi All:
    I had the following Word Basic macro that created an envelope, addressed it, & printed it. However, it will not convert to VBA under Word 2000 & I could find no equivalent VBA command for .ExtractAddress = 1, which returns an error. I'd like it to take the addressee near the top left of a document & automatically print the correct envelope. Would someone help out? Thanks.<pre>Sub MAIN
    ToolsCreateEnvelope .ExtractAddress = 1, .EnvAddress = "", _
    .EnvOmitReturn = 0, _
    .EnvReturn = "My Name" + Chr$(13) + "My Address" + Chr$(13) + "City, State zip", _
    .PrintBarCode = 0, .PrintEnvLabel, .EnvPaperSize = 0, .PrintFIMA = 1, _
    .AddrFromLeft = "Auto", .AddrFromTop = "Auto", .RetAddrFromLeft = "Auto", _
    .RetAddrFromTop = "Auto"
    End Sub
    </pre>


  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Print Envelope (Word 2000/SR-3)

    Phil, using the new dialog, I don't get any error, but... it ignores the specified return address and uses the one saved in the dialog the last time I used it interactively. Is that a step in the right direction??

    <pre>Sub TCEPhil()
    With Dialogs(wdDialogToolsCreateEnvelope)
    .ExtractAddress = 1
    .EnvAddress = ""
    .EnvOmitReturn = 0
    ' Next line is ignored; a saved address is shown; why??
    .EnvReturn = "My Name" + Chr$(13) + "My Address" + Chr$(13) + "City, State zip"
    .PrintBarCode = 0
    .PrintEnvLabel = True
    .EnvPaperSize = 0
    .PrintFIMA = 1
    .AddrFromLeft = "Auto"
    .AddrFromTop = "Auto"
    .RetAddrFromLeft = "Auto"
    .RetAddrFromTop = "Auto"
    .Execute
    End With
    End Sub</pre>

    I didn't try any other approach. Too late tonight.

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Envelope (Word 2000/SR-3)

    Thanks for this, Jefferson. Sorry for the delay in getting back. I'll try it out.

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print Envelope (Word 2000/SR-3)

    Hi again. Seems to work for my purposes. I don't know why you can't specify a return address other than the default either, but I don't need to. I had to change the envelope size = 2 for my machine. I'm not sure if there's a way to specify which tray. Sometimes it works on automatic, but seems to want to switch to (pause) sometimes. Thanks again.

Posting Permissions

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