R
Rhino
I am _really_ getting confused about the placement of macros!
I have finished my first serious VBA macro and I'm quite happy with it; it
does what I needed it to do and it doesn't _look_ too ugly, based on the
code snippets I've seen in the help and newsgroups as I've built this beast.
Then again, this is my first exposure to VBA after 20+ years of programming
so I don't know what I don't know yet, if you see what I mean....
Anyway, everything was just fine until I closed the document I'd been
working in. Now, I can't get my main macro's name to appear in the
Macro/Macros list in Word 2002. Some of the minor macros are there but the
main one, createResumeFromFile, does not appear in the list of available
macros, even though I've tried each of the four options in the dropdown
list, i.e. "All active templates and documents", "Normal.dot", "Word
Commands", or "Document1". Frankly, I was terrified that I'd somehow managed
to delete most of my macros when I couldn't see "createResumeFromFile"!!
The good news is that I can still get to the code for all of my macros so I
don't appear to have lost anything; I just can't figure out how to _invoke_
these macros now. To see the source code for my macros, all I need to do is
press Alt-F11 from inside any Word document. The resulting frame is entitled
"Microsoft Visual Basic - Normal - [NewMacros (Code)]". I _think_ this means
the code is in Normal.dot, right?
So, how do I invoke "createResumeFromFile" from my Word document if it isn't
available in the menu that results from Alt-F8? How do I make it visible
from the Alt-F8 menu?
I suspect that I've got my code in the wrong place and was planning to
organize it once I got the last few small things in the macro working
satisfactorily. But I don't seem to be able to run it any more since it is
missing from the Alt-F8 menu. Can anyone help me get this working again?
I've just spent a couple of hours hunting for an answer but I haven't found
an answer yet....
---
Beyond the immediate crisis, can anyone verify that the proper placement of
my macro is within its document? My main macro, createResumeFromFile, and
the vast majority of the smaller routines it calls will only ever be used to
create one particular document, my resume, which I'm calling resume.doc.
There are a couple of minor routines, like eraseContent which erases all of
the existing text in the document, which may get used in other documents so
I imagine that those routines should be in normal.dot.
Have I got the basic idea right?
I have finished my first serious VBA macro and I'm quite happy with it; it
does what I needed it to do and it doesn't _look_ too ugly, based on the
code snippets I've seen in the help and newsgroups as I've built this beast.
Then again, this is my first exposure to VBA after 20+ years of programming
so I don't know what I don't know yet, if you see what I mean....
Anyway, everything was just fine until I closed the document I'd been
working in. Now, I can't get my main macro's name to appear in the
Macro/Macros list in Word 2002. Some of the minor macros are there but the
main one, createResumeFromFile, does not appear in the list of available
macros, even though I've tried each of the four options in the dropdown
list, i.e. "All active templates and documents", "Normal.dot", "Word
Commands", or "Document1". Frankly, I was terrified that I'd somehow managed
to delete most of my macros when I couldn't see "createResumeFromFile"!!
The good news is that I can still get to the code for all of my macros so I
don't appear to have lost anything; I just can't figure out how to _invoke_
these macros now. To see the source code for my macros, all I need to do is
press Alt-F11 from inside any Word document. The resulting frame is entitled
"Microsoft Visual Basic - Normal - [NewMacros (Code)]". I _think_ this means
the code is in Normal.dot, right?
So, how do I invoke "createResumeFromFile" from my Word document if it isn't
available in the menu that results from Alt-F8? How do I make it visible
from the Alt-F8 menu?
I suspect that I've got my code in the wrong place and was planning to
organize it once I got the last few small things in the macro working
satisfactorily. But I don't seem to be able to run it any more since it is
missing from the Alt-F8 menu. Can anyone help me get this working again?
I've just spent a couple of hours hunting for an answer but I haven't found
an answer yet....
---
Beyond the immediate crisis, can anyone verify that the proper placement of
my macro is within its document? My main macro, createResumeFromFile, and
the vast majority of the smaller routines it calls will only ever be used to
create one particular document, my resume, which I'm calling resume.doc.
There are a couple of minor routines, like eraseContent which erases all of
the existing text in the document, which may get used in other documents so
I imagine that those routines should be in normal.dot.
Have I got the basic idea right?