Creating a message that "pops up" when a user opens a template (.d

A

Afoster

Hi -- I need to know how to create an automatic message 'popup' that will
open when a user opens a particular template. Can I use 'forms' or do I need
to actually write a script using Visual Basic? Any information on how this
script might be written would also help.

Thanks!

A Foster
 
J

Jonathan West

Afoster said:
Hi -- I need to know how to create an automatic message 'popup' that will
open when a user opens a particular template. Can I use 'forms' or do I
need
to actually write a script using Visual Basic? Any information on how
this
script might be written would also help.

Create a new module in the template using the VBA editor. Create a macro
named AutoOpen if you want the popup to happen every time a document based
on the template is opened, or AutoNew if you want the popup to happen when a
new document based on the template is created.

What do you want this popup to contain? is a simple messagebox enough?


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
D

Doug Robbins - Word MVP

I assume that by "when a user opens a particular template" you mean that
"when a user creates a new document by selecting the template in the
File>New dialog.

If that is the case and it is just a message that you want to display,
create the following macro IN the template:

Sub Autonew()

Msgbox "This is my message."

End Sub

If however you need the user to be able to input information, you are better
off to use a userform.

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top