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 2007

Tip: Looking for answers? Try searching our database.

Load document after start-up form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
thomas.b.mann@gmail.com - 31 Aug 2007 21:57 GMT
New to VBA in Word.

I have a simple form that I want to pop up when the user opens a
document.  When the user does something there and clicks a 'submit'
button I want the document to open.  Simple right?

So far I have:

In module AutoExec:

Sub Main()
Load UserForm1
UserForm1.Show
End Sub

In the click event for a button on UserForm1 I have this (for
simplicity let's assume the button does nothing else but I just want
to proceed with opening the document):

Private Sub btnSubmit_Click()
Me.Hide
ThisDocument.Activate
End Sub

This is apparently not correct.  I have tried a few other things such
as:

Load ThisDocument
Unload Me

This must be something simple.  Any help?
Shauna Kelly - 01 Sep 2007 03:05 GMT
Hi Thomas

Before we can help, we need some more information:
- do you want this form to show when a user opens *any* document, or just
specific documents?
- do you want this form to show when a user creates a new document? If so,
does it apply to every new document, or just some?

And, what version of Word are you using?

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> New to VBA in Word.
>
[quoted text clipped - 27 lines]
>
> This must be something simple.  Any help?
 
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.