I am struggling with a macro in 3.5e and hope someone can help me. Here is what I want the macro to do in MS Word 2003:
1. insert a number (beginning at 1) at the cursor location in doc 1
2. go to doc 2 and do the following
3. search for the bookmark named stop
4. at the bookmark type open a menu of choices of text to type at that location
5. when the choice is made, type AQ
6. immediately following the Q insert the same number as in step 1 above
7. type the balance of the text
8. add a paragraph return (so that the cursor is at the beginning of the next line) and insert at this location the bookmark called stop
9. go to doc 1 where the number inserted in step 1 is found
10. add 1 to that number and save it to the macro so that the next time the macro is run the number inserted in steps 1 and 6 is 1 more than it was the last time the macro was run.
However, although the numbering will increase in doc 1 until until I am done working in doc 1, when I open doc 3 and its companion doc 4, the numbering need to start at 1 again. Consequently, I need an easy way to reset the starting number to 1.
Although I have used the terms doc 1, doc 2, doc 3, and doc 4, the actual documents are paired and will always have the following in their names so that the <Activate:> command can be used and set once.
Docs 1 and 3 would be the main text documents and always have .EDT.doc in the name. The companion docs, 2 and 4, are for questions about content in the other docs and always have _queries.doc in the name.
I have not had much trouble with most of the coding, but I can't figure out how to write the code to accomplish 1, 6, and 10. What happens is that the number remains the same, that is, it remains the starting number (which is 1). It seems to me that the best way to store the number is in a separate "macro" that is called, but I'm open to any and all suggestions.
Thanks.
Rich Adin
rhadin@editorsource.com