New document from existing - "lost macros"?

M

Michal kralik

Hello,

I have empty document with one module and this sub:

Public Sub TestMessage()
MsgBox ("Test")
End Sub

This document is saved as doc1.doc (Word document - not template).
Now I choose File - New from existing and select doc1.doc so new document is
created.
The problem is that I cannot see macro TestMessage in list of macros for run
(Alt+F8). If I open editor and i.e. change name of module or recompile
project - I can see that macro.
Where is the problem? I have to see it when new document is opened. I can
change the name of module (it probably invoke recompile) programmatically but
Truth access VBA project must be checked :-(
Thanx.
PS: I cannot use template (.dot)
 
G

Graham Mayor

Why can you not use a template? Documents are not templates. If you want
this to work save the document as a template.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Michal kralik

OK, this is simple example. in real "doc1.doc" has attached template with
macros. This template has digital signature so I cannot modify it.
 

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