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 / November 2006

Tip: Looking for answers? Try searching our database.

running a macro "after" a document opens"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BRC - 21 Nov 2006 00:08 GMT
I have a template that has some fields that are updated when the
document opens and should leave the cursor at a point to start typing
the  letter. The problem I am having is that the template also inserts
a logo at the top of the page. the auto exec macro runs before the logo
is inserted so the cursor ends up back at the top of the page rather
than in the body of the letter. this surprises me because the logo is
embedded in the template (not inserted by the autoexec macro)
I tried renaming autoexec to autoopen with same results. Any
suggestions would be appreciated.
BRC
Jean-Guy Marcil - 21 Nov 2006 02:36 GMT
BRC was telling us:
BRC nous racontait que :

> I have a template that has some fields that are updated when the
> document opens and should leave the cursor at a point to start typing
[quoted text clipped - 6 lines]
> suggestions would be appreciated.
> BRC

AutoExec macros are meant to be used when Word is launched, not when a
document is opened.

Now, from your description it is not entirely clear what is going on.

Do you have one or two macros (logo / fields)?

Can you post your code (or the relevant part if it is too long)?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Graham Mayor - 21 Nov 2006 05:19 GMT
If you want the code to run when the document is created from the template
it should be called Autonew - not autoexec or autoopen?

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> I have a template that has some fields that are updated when the
> document opens and should leave the cursor at a point to start typing
[quoted text clipped - 6 lines]
> suggestions would be appreciated.
> BRC
 
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.