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 / September 2005

Tip: Looking for answers? Try searching our database.

Dialog Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Inquiring Minds - 30 Jun 2005 17:09 GMT
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.
Anne P. - 30 Jun 2005 17:41 GMT
In VBA help, search for Message box (MsgBox).  This is how you would do what
you want.

Anne P.
>I would like to have a dialog box appear each time a Word Document is
>opened.
[quoted text clipped - 5 lines]
>
> Thank you, your assistance would be much appreciated.
Inquiring Minds - 30 Jun 2005 22:20 GMT
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.

> In VBA help, search for Message box (MsgBox).  This is how you would do what
> you want.
[quoted text clipped - 9 lines]
> >
> > Thank you, your assistance would be much appreciated.
Dave Lett - 30 Jun 2005 19:15 GMT
Hi,

I think you might want to have a look at the article "Running a macro
automatically when a document is created, opened or closed" at
http://word.mvps.org/faqs/macrosvba/DocumentEvents.htm

HTH,
Dave

>I would like to have a dialog box appear each time a Word Document is
>opened.
[quoted text clipped - 5 lines]
>
> Thank you, your assistance would be much appreciated.
Inquiring Minds - 30 Jun 2005 22:22 GMT
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.

> Hi,
>
[quoted text clipped - 14 lines]
> >
> > Thank you, your assistance would be much appreciated.
Jonathan West - 05 Jul 2005 12:14 GMT
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.

Signature

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

> Hello Dave,
>
[quoted text clipped - 25 lines]
>> >
>> > Thank you, your assistance would be much appreciated.
Krakmup - 29 Sep 2005 20:13 GMT
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

> 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
[quoted text clipped - 29 lines]
> >> >
> >> > Thank you, your assistance would be much appreciated.

Rate this thread:






 
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.