Frankly I wouldn't bother. Why not simply make an envelope template and make
it available to all? You can even download an automated sample from my web
site.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Ok. is there a way to take a small bit of vba code, and have it available, to
all users, for running when word starts? how can i set that up for 25
computers, on all users accounts including those that haven't been created on
the machine yet? I can lower or change settings for security too if needed.
The small code works as a macro. when you click envelopes it automatically
changes the print settings then pulls up the dialog box (shown below). I
didn't see how to do that from the mvp site. Also, does anyone know how to
change the tray? that doesn't seem to work.
Sub ToolsCreateEnvelope()
' Change Default Printer for Envelope Wizard
' Resets printer settings back when finished
Dim sCurrentPrinter As String
Dim sTray As String
Dim sQuery As String
sCurrentPrinter = ActivePrinter 'Save the current printer
sTray = Options.DefaultTray 'Save the current tray
ActivePrinter = "\\ps-birch\law-clinicletter" 'Set the required envelope
printer
Options.DefaultTray = "Envelope Feeder" 'Set tray used for envelopes
Dialogs(wdDialogToolsCreateEnvelope).Show 'Pop up the envelope dialog
ActivePrinter = sCurrentPrinter 'Restore the original printer
Options.DefaultTray = sTray 'Restore the original tray
End Sub
> Frankly I wouldn't bother. Why not simply make an envelope template and make
> it available to all? You can even download an automated sample from my web
[quoted text clipped - 12 lines]
> > who sign in as well.
> > Thanks
Scott - 23 Jan 2008 15:03 GMT
Greg,
I would double-check the printer settings to see what the tray is named
there (ie: "Manual Feed", "Bypass Tray", etc.). Also, you can sometimes get
this info by starting to record a blank macro, manually select the print job
just as you would like it, then stop the recording and look at it in the
editor.
The biggest issue I'm having with this (I'm actually trying the same thing)
- is that when you run this as a macro rather than running the envelope
wizard manually, the delivery address from the Word document is not
automatically inserted when you run the macro. Does anyone know an easy way
to override this?
Selection.Copy
and Selection.Paste
do not work as the macro pauses while the envelope wizard is running.
Any ideas?
Scott
> Ok. is there a way to take a small bit of vba code, and have it available, to
> all users, for running when word starts? how can i set that up for 25
[quoted text clipped - 38 lines]
> > > who sign in as well.
> > > Thanks