AutoOpen

G

Gitche Gumee

My AutoOpen macro has stopped working. It's this:
ActiveWindow.Caption = ActiveDocument.FullName

If I open a document using File | Open, it works.

Double-clicking a document name or icon does not work. Once the document is
open, though, I can run the AutoOpen macro manually and it works.

Any thoughts?

Windows XP, Office 2002
 
H

Helmut Weber

Hi Gitche Gumee,

try:

Sub autoopen()
MsgBox "autoopen"
Application.OnTime _
When:=Now + TimeValue("00:00:02"), _
Name:="autoopenX"

End Sub
Sub autoopenX()
ActiveWindow.Caption = ActiveDocument.FullName
End Sub

There were dicussions here on
"how to determine if a document is fully loaded",
just in case you want to know it all.

It is a matter of multitasking,
asynchronous processing,
which might not have been a good idea after all,
at least in the way it was implemented.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
G

Gitche Gumee

After much wailing and gnashing of teeth, I have solved the problem. The DOC
file extension had become disassociated from Word. In Folder Options, the DOC
extension was listed as file type "DOC file" rather than "Microsoft Word
Document." Word still opened up the document but without running the autoopen
macro.

I reassigned the DOC extension to Microsoft Word, and all is well. Thanks
for your assistance.
 

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