*.dot won't run a "Document_Open" Macro when opened from Netwrk Se

B

Brendan

I have a *.dot file that is setup on our network server for users to access.
The document opens fine but I need to force open a User Form (UserForm1) as
soon as the template opens. Additionally, if I run the template from my
local machine I can get the User Form to open via the below code.

Private Sub Document_Open()
Application.Run MacroName:="goPCDFiller"
End Sub

(1) What code to I need to execute to get the template to open the User form
when it is deployed on a network server?

(2) Also, is there a code available that forces open WORD to view/run the
template because many of our users have “Quick View Plus†installed (which is
fine) but it takes over the *.doc and *.dot files when the user tries to open
one of them.
 
C

Cindy M.

Hi =?Utf-8?B?QnJlbmRhbg==?=,
I have a *.dot file that is setup on our network server for users to access.
The document opens fine but I need to force open a User Form (UserForm1) as
soon as the template opens. Additionally, if I run the template from my
local machine I can get the User Form to open via the below code.
By default, if someone accesses a *.dot file, the command that's executed is "New"",
not "Open". So try putting your code in a Document_New procedure. Also, stick a
MsgBox in there for testing purposes, just so you can be sure the procedure is
executing. This will let you know whether the problem is just with calling the
macro.

If you're still experiencing problems, where is "goPCDFiller" located?
Private Sub Document_Open()
Application.Run MacroName:="goPCDFiller"
End Sub

(1) What code to I need to execute to get the template to open the User form
when it is deployed on a network server?

(2) Also, is there a code available that forces open WORD to view/run the
template because many of our users have “Quick View Plus†installed (which is
fine) but it takes over the *.doc and *.dot files when the user tries to open
one of them.
You should be able to configure the machines to recognize these extensions as
belonging to Word, and nothing else. It's controlled in the Registry. Re-registering
(repairing) the Word installation should do it. But it also ought to be possible
(and securer) using a Policy. If this is new territory for you, I recommend the
office.setup newsgroup :)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in
the newsgroup and not by e-mail :)
 
B

Brendan

It is located in my project under the "ThisDocument" within "Microsoft Word
Objects" - if that helps.
 
C

Cindy M.

Hi =?Utf-8?B?QnJlbmRhbg==?=,
It is located in my project under the "ThisDocument" within "Microsoft Word
Objects" - if that helps.
So using Document_New instead of Document_Open didn't help? And did a MsgBox
display in either one?
Use just the macro name, nothing else. Put a MsgBox at the top of
goPCDFiller, before any other statements. Does that display?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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