R
Rhino
I've spent the last few days working on a series of interrelated macros;
basically, there is a main macro and it farms out lots of its work to lesser
procedures. All of this code is working well and is stored in Normal.dot.
Is there any way that I can get the source code from Normal.dot and write it
to a text file invisibly? I realize that I could do this job manually by:
- opening the Visual Basic Editor from my document
- clicking Edit/Select All
- clicking Copy
- opening a text file outside of Word
- pasting the clipboard into the text file
- saving the text file
But I will probably make several more minor changes to the macros before
they're absolutely finished so I'd like to find a way to get the source code
of the macros "automagically", ideally with a VBScript that invokes a macro
that writes all of the macros in Normal.dot to a specified text file.
Can anyone tell me what to do?
I can write the VBScript that will drive all of this but I'm really not sure
how to capture the contents of Normal.dot so that I can write it to a file.
Even if I just record a macro that does the manual steps that I've listed
above, I don't have any idea how to open a text file, paste the clipboard
and save the text file programmatically.
I just tried recording a macro that did all that but the only line in the
macro is 'ShowVisualBasicEditor = True' so that's obviously not going to do
the job.
I'm using Word 2002.
basically, there is a main macro and it farms out lots of its work to lesser
procedures. All of this code is working well and is stored in Normal.dot.
Is there any way that I can get the source code from Normal.dot and write it
to a text file invisibly? I realize that I could do this job manually by:
- opening the Visual Basic Editor from my document
- clicking Edit/Select All
- clicking Copy
- opening a text file outside of Word
- pasting the clipboard into the text file
- saving the text file
But I will probably make several more minor changes to the macros before
they're absolutely finished so I'd like to find a way to get the source code
of the macros "automagically", ideally with a VBScript that invokes a macro
that writes all of the macros in Normal.dot to a specified text file.
Can anyone tell me what to do?
I can write the VBScript that will drive all of this but I'm really not sure
how to capture the contents of Normal.dot so that I can write it to a file.
Even if I just record a macro that does the manual steps that I've listed
above, I don't have any idea how to open a text file, paste the clipboard
and save the text file programmatically.
I just tried recording a macro that did all that but the only line in the
macro is 'ShowVisualBasicEditor = True' so that's obviously not going to do
the job.
I'm using Word 2002.