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

Re: Macros for All users in a lab by Jonathan

Jonathan
Thu Jan 17 14:38:44 PST 2008


"Greg" <Greg@discussions.microsoft.com> wrote in message
news:EA6FFFC8-7450-4CAB-B26F-50CF8471EB3F@microsoft.com...
>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
>

Distributing macros to other users
http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm

Running a macro automatically when Word starts or quits
http://www.word.mvps.org/FAQs/MacrosVBA/ApplicationEvents.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



Re: Macros for All users in a lab by Jonathan

Jonathan
Thu Jan 17 16:23:40 PST 2008


"Greg" <Greg@discussions.microsoft.com> wrote in message
news:BAA9E631-8F12-4EFC-8344-FDFC5CA0DC40@microsoft.com...
>I have read both of those articles already and i am still having issues.
>The
> VBA script i have automatically runs when you click on the Envelopes
> button
> in word 2007. I just need that macro to be available to the user when the
> program starts. I've noticed that as long as the macro loaded up, it will
> run
> when needed. However, trying to move the script to another machine was the
> problem. I put it into the Startup folder and it never ran properly,
> giving
> an error. At that point i tried to modify the script on the new computer
> and
> it would deny me access to do so. It seems the security is screwed up. I
> don't know how to change the security for that script so every user's
> account
> will be able to use that macro. I also don't know how to change the
> settings
> for every user to share the same start folder either. any more help?

Did you put the macro into a separate template, and put that template in the
startup folder?

If not, do that.

If the macro is being blocked by Security settings, then you may need to
digitally sign the template, and have people accept the certificate. if you
did a full install of Office, you should have a utility available called
"Digital Certificate for VBA projects". Use that to make a certificate, sign
the template with it, and try distributing the template again.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



Re: Macros for All users in a lab by Greg

Greg
Thu Jan 17 15:14:03 PST 2008

I have read both of those articles already and i am still having issues. The
VBA script i have automatically runs when you click on the Envelopes button
in word 2007. I just need that macro to be available to the user when the
program starts. I've noticed that as long as the macro loaded up, it will run
when needed. However, trying to move the script to another machine was the
problem. I put it into the Startup folder and it never ran properly, giving
an error. At that point i tried to modify the script on the new computer and
it would deny me access to do so. It seems the security is screwed up. I
don't know how to change the security for that script so every user's account
will be able to use that macro. I also don't know how to change the settings
for every user to share the same start folder either. any more help?

"Jonathan West" wrote:

>
> "Greg" <Greg@discussions.microsoft.com> wrote in message
> news:EA6FFFC8-7450-4CAB-B26F-50CF8471EB3F@microsoft.com...
> >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
> >
>
> Distributing macros to other users
> http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm
>
> Running a macro automatically when Word starts or quits
> http://www.word.mvps.org/FAQs/MacrosVBA/ApplicationEvents.htm
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
>
>
>

Re: Macros for All users in a lab by Graham

Graham
Fri Jan 18 00:35:23 PST 2008

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



Re: Macros for All users in a lab by Greg

Greg
Fri Jan 18 09:01:01 PST 2008

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
>
>
>

Re: Macros for All users in a lab by Scott

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
> >
> >
> >