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

    Long Shot (97SR2)

    Does anyone know how to invoke the attached dialog via VBA (I'll take VB, API or an elusive WinAPE call, too) Whatever does the trick.
    Attached Files Attached Files
    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>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Long Shot (97SR2)

    Kevin,

    The folowing will bring up the Envelopes & Labels (Envelope Tab) dialog, but requires the Options button to be clicked to invoke the dialog you are after. However, I suspect you are trying to circumvent the need to click Options. but for what it is worth :<pre>With Application.Dialogs(wdDialogToolsCreateEnvelope)
    .DefaultTab = wdDialogToolsEnvelopesAndLabelsTabEnvelopes
    .Show
    End With</pre>


    Andrew

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

    Re: Long Shot (97SR2)

    Andrew,

    That's right: I don't want to have to click the options button. Arggg.

    Curses, foiled again.
    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>

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Long Shot (97SR2)

    Well, maybe you personally don't have to click it :-<pre>SendKeys "%{O}"
    With Application.Dialogs(wdDialogToolsCreateEnvelope)
    .DefaultTab = wdDialogToolsEnvelopesAndLabelsTabEnvelopes
    .Show
    End With</pre>


    Any better ?

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

    Re: Long Shot (97SR2)

    Well...

    I'm trying to set that darned "Feed From" dropdown. Those dialog argument are still a mystery. I'm trying to supply some value for UseEnvFeeder and have concluded that it takes TRUE FALSE only. So that's not it. Maybe EnvPaperName?
    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>

  6. #6
    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: Long Shot (97SR2)

    I can't find a separate handle for that dialog in 2000. However, most of these properties might really be in that dialog under various cryptic names. This was cobbled together by playing with various options while recording a macro, consulting help for the PrintOut method of Envelope and for the dialog, and looking up ToolsCreateEnvelope in the Word 6.0 Developer's Kit.

    1. DefaultOrientation: wdLeftPortrait, wdCenterPortrait, wdRightPortrait, wdLeftLandscape, wdCenterLandscape, or wdRightLandscape. Checking the "Clockwise rotation" button toggles the latter three options to wdLeftClockwise, wdCenterClockwise, or wdRightClockwise.

    2. DefaultFaceUp: True or False

    3. UseEnvFeeder: integer value starting from 0 for sources in the Feed From box. I can only use 0 or 1 or I get an "out of range" error. So this doesn't work correctly for me.

  7. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Long Shot (97SR2)

    Just add SEndKeys

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

    Re: Long Shot (97SR2)

    Jefferson,

    Take a look at this key (or the corresponding 9.0 key) in your registry (that's a network printer, so if you are standalone, the name might not include the computername):

    HKEY_CURRENT_USERSoftwareMicrosoftOffice8.0Word,,S erverName,PrinterName

    I see a EnvBin value that changes when I manually select one of 4 available bins using the Feed From drop down.

    Setting UseEnvFeeder to values 0-3 are accepted (I get the out of range error too with 4 or above). That all makes sense. However, UseEnvFeeder DOES NOT change the registry nor does it change the Feed From value. Sumpin's broke (an esoteric Word 97 bug?)

    Thanks for your trooper effort here. Am I running into Word 97 shortcomings?

    TRY THIS FOR ME: If you change UseEnvFeeder from 0 to 1 in Word 2000 does the Feed From value change?
    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>

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

    Re: Long Shot (97SR2)

    That won't work. Sorry. Thanks for posting though. See above post.
    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>

  10. #10
    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: Long Shot (97SR2)

    Kevin, my Registry shows changes as well when I play with the dialog manually:

    Tray 1 (Manual)
    [HKEY_CURRENT_USERSoftwareMicrosoftOffice9.0WordTMS hort PS]
    "DefaultBin"=""
    "EnvFeed_256"="0"
    "EnvBin"="256"
    "EnvFeed_7"="36"

    Default tray (AutoSelect tray)
    [HKEY_CURRENT_USERSoftwareMicrosoftOffice9.0WordTMS hort PS]
    "DefaultBin"=""
    "EnvFeed_256"="0"
    "EnvBin"="7"
    "EnvFeed_7"="36"

    However, the path to this data depends on the printer name, so you'd have to check that first to change the setting. I'm not quite sure how these values relate to the dialog settings.... I only get "AutoSelect" when I try setting UseEnvFeeder (whether 0 or 1). And after clicking Reset, my registry looks like this:

    AutoSelect tray
    [HKEY_CURRENT_USERSoftwareMicrosoftOffice9.0WordTMS hort PS]
    "DefaultBin"=""
    "EnvFeed_256"="0"
    "EnvBin"="7"
    "EnvFeed_7"=""

    The following will switch it to manual feed, as I like it for envelopes in my environment, but I have no idea whether this is at all portable to anywhere else:

    Sub ToggleFeed()
    System.PrivateProfileString("", "HKEY_CURRENT_USERSoftwareMicrosoftOffice9.0WordTM Short PS", _
    "EnvBin") = 256
    With Dialogs(wdDialogToolsEnvelopesAndLabels)
    .Display
    End With
    End Sub

Posting Permissions

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