Hi Jan,
mmm yes I did.... at some point... :-/ this wasn't the first time
in last couple of days.. so am I doing something wrong?
Is the VBA project saved compiled or as source and can be extracted from the
file? (macros are running normally)
As far as I know, the VBA can't be extracted from a project that can't be
opened in the VB Editored. Not even in a file saved as Word 2003 XML. The one
thing you can try (but I'm not optimistic) is Tools/Templates and
Addins/Organizer. The tab for copying macros will let you copy a module from
one project to another (under normal circumstances).
The only other possibility I know of to access code is through the VBE (Visual
Basic Extensibility). Unfortunately (or fortunately, from my POV), I don't have
a file I could test this on. The following line of code, for example, will
export the specified code module of the given project (in this case "Module 1"
in the Normal.dot template) to a BAS file (emulates File/Export in the VB
Editor):
NormalTemplate.VBProject.VBComponents(2).Export("C:\Normal_Module1.bas")
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
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
