Reply
 
Thread Tools Display Modes
  #1   Report Post  
G Lee
 
Posts: n/a
Default How To Run Macro on Open

Can I get my macro to run upon opening my Word document? I have ASK fields
that the users needs to populate, but I want to come up automatically so that
they will not have to remember the macro command.
  #2   Report Post  
Jezebel
 
Posts: n/a
Default

Call the macro AutoNew (to run once, when the document is first created) or
AutoOpen (to run every time the document is opened).



"G Lee" G wrote in message
...
Can I get my macro to run upon opening my Word document? I have ASK

fields
that the users needs to populate, but I want to come up automatically so

that
they will not have to remember the macro command.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Robert_L_Ross Robert_L_Ross is offline
external usenet poster
 
Posts: 15
Default How To Run Macro on Open

Jezebel,

So I have a document template with a userform. I have a sub that filters
data I'm pulling from Excel to put into a combobox on my userform.

When I open my .dot, the .doc is created and the userform displays...how do
I get a macro to run from that userform code?

For example, I have three checkboxes that filter the data returned from
Excel...I don't want to put the filter on all three checkboxes (that's three
places I have to update instead of one). How do I get my checkbox_click to
run a sub located in module1?

"Jezebel" wrote:

Call the macro AutoNew (to run once, when the document is first created) or
AutoOpen (to run every time the document is opened).



"G Lee" G wrote in message
...
Can I get my macro to run upon opening my Word document? I have ASK

fields
that the users needs to populate, but I want to come up automatically so

that
they will not have to remember the macro command.




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How To Run Macro on Open

Maybe you should take a look at some basic information on userforms at Word
MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm. You will find some more real world
examples on Greg Maxey's web site http://gregmaxey.mvps.org/word_tips.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Robert_L_Ross wrote:
Jezebel,

So I have a document template with a userform. I have a sub that
filters data I'm pulling from Excel to put into a combobox on my
userform.

When I open my .dot, the .doc is created and the userform
displays...how do I get a macro to run from that userform code?

For example, I have three checkboxes that filter the data returned
from Excel...I don't want to put the filter on all three checkboxes
(that's three places I have to update instead of one). How do I get
my checkbox_click to run a sub located in module1?

"Jezebel" wrote:

Call the macro AutoNew (to run once, when the document is first
created) or AutoOpen (to run every time the document is opened).



"G Lee" G wrote in message
...
Can I get my macro to run upon opening my Word document? I have
ASK fields that the users needs to populate, but I want to come up
automatically so that they will not have to remember the macro
command.



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Robert_L_Ross Robert_L_Ross is offline
external usenet poster
 
Posts: 15
Default How To Run Macro on Open

Graham,

Maybe I missed it, but I didn't see any references to calling one set of
code from a currently running code on those pages.

"Graham Mayor" wrote:

Maybe you should take a look at some basic information on userforms at Word
MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm. You will find some more real world
examples on Greg Maxey's web site http://gregmaxey.mvps.org/word_tips.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Robert_L_Ross wrote:
Jezebel,

So I have a document template with a userform. I have a sub that
filters data I'm pulling from Excel to put into a combobox on my
userform.

When I open my .dot, the .doc is created and the userform
displays...how do I get a macro to run from that userform code?

For example, I have three checkboxes that filter the data returned
from Excel...I don't want to put the filter on all three checkboxes
(that's three places I have to update instead of one). How do I get
my checkbox_click to run a sub located in module1?

"Jezebel" wrote:

Call the macro AutoNew (to run once, when the document is first
created) or AutoOpen (to run every time the document is opened).



"G Lee" G wrote in message
...
Can I get my macro to run upon opening my Word document? I have
ASK fields that the users needs to populate, but I want to come up
automatically so that they will not have to remember the macro
command.






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How To Run Macro on Open

The code to run a macro from another is

Application.Run MacroName:="macroname"


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Robert_L_Ross wrote:
Graham,

Maybe I missed it, but I didn't see any references to calling one set
of code from a currently running code on those pages.

"Graham Mayor" wrote:

Maybe you should take a look at some basic information on userforms
at Word MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm. You will find some more
real world examples on Greg Maxey's web site
http://gregmaxey.mvps.org/word_tips.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Robert_L_Ross wrote:
Jezebel,

So I have a document template with a userform. I have a sub that
filters data I'm pulling from Excel to put into a combobox on my
userform.

When I open my .dot, the .doc is created and the userform
displays...how do I get a macro to run from that userform code?

For example, I have three checkboxes that filter the data returned
from Excel...I don't want to put the filter on all three checkboxes
(that's three places I have to update instead of one). How do I get
my checkbox_click to run a sub located in module1?

"Jezebel" wrote:

Call the macro AutoNew (to run once, when the document is first
created) or AutoOpen (to run every time the document is opened).



"G Lee" G wrote in message
...
Can I get my macro to run upon opening my Word document? I have
ASK fields that the users needs to populate, but I want to come up
automatically so that they will not have to remember the macro
command.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Word 2002: When open program: 2 documents open at the same tim. cary1955 Microsoft Word Help 1 January 10th 05 12:18 PM
Text Recovery and Open & Repair in WD 2003? UserRAW1975 Microsoft Word Help 1 December 22nd 04 04:00 AM
Save As is not working due to macro security settings Craig Meritz Microsoft Word Help 1 December 16th 04 04:53 AM
Why does Word ask if I want to make a copy when I open a document. ROKJO Microsoft Word Help 1 December 10th 04 04:59 PM
Recover A File That Will Not Open xsmearedblackinkx Microsoft Word Help 1 November 28th 04 01:26 AM


All times are GMT +1. The time now is 09:05 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"