Dialog Box

I

Inquiring Minds

I would like to have a dialog box appear each time a Word Document is opened.
The dialog box will only be a notice to users when opening the document, so
the option they would have to close the dialog box is "OK". How would I do
this? I am working on Word 2003 on XP workstations.

Thank you, your assistance would be much appreciated.
 
A

Anne P.

In VBA help, search for Message box (MsgBox). This is how you would do what
you want.

Anne P.
 
I

Inquiring Minds

thank you for you response, but I am not very knowledgable using VBA. I
looked up Message Box in the Help of VBA and I don't understand which one I
need and how and where to enter the code. Please excuse me for my ignorance.
 
I

Inquiring Minds

Hello Dave,

I went to the site and it explained how to begin creating the macro, but
doesn't explain how to create the dialog box. Would you be able to direct me
where I can get those instructions.

Thank you.
 
J

Jonathan West

You need the MsgBox function. Details on how to use it are in the VBA help,
complete with code examples. To reach the appropriate help page, simply type
MsgBox in the VBA editing window and then press the F1 key.

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

Krakmup

G'Day
Try this:
Sub Auto_Open()
Msg = "Hello " & username
MsgBox Msg
End Sub

Use Chr(13) to insert a paragraph mark, ie
Msg = "Hello " & username & Chr(13) & "Did you remember that you are buying
lunch today?"
Krakmup
 

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