Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Macros for All users in a lab

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg - 17 Jan 2008 22:20 GMT
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
Jonathan West - 17 Jan 2008 22:38 GMT
>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
[quoted text clipped - 10 lines]
> 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

Signature

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

Greg - 17 Jan 2008 23:14 GMT
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?

> >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
[quoted text clipped - 16 lines]
> Running a macro automatically when Word starts or quits
> http://www.word.mvps.org/FAQs/MacrosVBA/ApplicationEvents.htm
Graham Mayor - 18 Jan 2008 08:35 GMT
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
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I have a macro that will automatically change the settings in the
> envelope wizard for our current setup of printers. the printer with
[quoted text clipped - 8 lines]
> who sign in as well.
> Thanks
Greg - 18 Jan 2008 17:01 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.