Scott
Wed Jan 23 07:03:01 PST 2008
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
"Greg" wrote:
> 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
>
> "Graham Mayor" wrote:
>
> > 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.
> >
> > --
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> > Graham Mayor - Word MVP
> >
> > My web site www.gmayor.com
> > Word MVP web site
http://word.mvps.org
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >
> > Greg wrote:
> > > I have a macro that will automatically change the settings in the
> > > envelope wizard for our current setup of printers. the printer with
> > > envelops is different than the default printer used in the lab.
> > > Anyway, How can i set it up so when a users logs into the computer
> > > and uses word, it automatically puts this macro into action?
> > > I created a template with the macro in it so it also changes the font
> > > automatically but when i put it in the startup folder, the security
> > > settings don't allow the macro to run. How can i get around this? I
> > > can change security on the computers for macros, but then need to
> > > know how to change it for every user on the computer and new users to
> > > who sign in as well.
> > > Thanks
> >
> >
> >