[RESOLVED] (Word)Stuck programming macros
I have very specific needs for the forms I'm creating. Currently, I have two problems.
1. I need to mimic the "goto" function from Word Perfect (where the document would add returns until it got to the appropriate line). The "goto" function in Word doesn't do that unless the line number already exists, and that doesn't help me. Any ideas?
2. I need to insert macros that I have already created that have two columns into a two columned section, basically "nesting" the columns. Any ideas?
Re: (Word)Stuck programming macros
An example of my first problem is here:
Selection.TypeParagraph
Selection.TypeText Text:= _
"II. The above captioned property is subject to the followi"
Selection.TypeText Text:="ng conveyances and encumbrances:"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeText Text:="@"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.Font.Bold = wdToggle
' Bold on
Selection.TypeText Text:="Company, Inc."
Selection.Font.Bold = wdToggle
Instead of all the "Selection.TypeParagraph" lines, I'd like something simliar to a loop or if-then statement to start the bold and next text at line 35 (for example)
Re: (Word)Stuck programming macros
how about
vb Code:
for i = 1 to 35
Selection.TypeParagraph
next
Re: (Word)Stuck programming macros
westconn1 - Thanks for the suggestion, but I was hoping to do this without creating a variable. The other people who will update the code after I'm gone wouldn't understand that...also, I need to use this loop in multiple macros, so the stuff before the break in my form starts on a different line in each form. Does that make sense?
Re: (Word)Stuck programming macros
Quote:
Does that make sense?
not at all
Quote:
but I was hoping to do this without creating a variable.
you have to have some counter or other way to know when to stop, you could have a do loop.till some criteria, but it is really the same thing
Quote:
The other people who will update the code after I'm gone
they can dig you up to fix it