J
Jim
Hi all,
My problem is to insert many .doc files to one .doc file.
Pseudocode looks like this:
1. Read heading
2. try to find file
3. if found insert it -> goto next heading
4. if not found -> goto next heading
I try to apply this example code.
With ActiveDocument.Content.Find
.ClearFormatting
.Style = wdStyleHeading3
Do While .Execute(FindText:="", Forward:=True, _
Format:=True) = True
With .Parent
.StartOf Unit:=wdParagraph, Extend:=wdMove
.InsertAfter "Tip: "
.Move Unit:=wdParagraph, Count:=1
End With
Loop
End With
How I can browse all heading types? This example generates always new
heading and after that inserts the word "Tip:". My target is only
insert file after heading, how to modify code?
Thank you
My problem is to insert many .doc files to one .doc file.
Pseudocode looks like this:
1. Read heading
2. try to find file
3. if found insert it -> goto next heading
4. if not found -> goto next heading
I try to apply this example code.
With ActiveDocument.Content.Find
.ClearFormatting
.Style = wdStyleHeading3
Do While .Execute(FindText:="", Forward:=True, _
Format:=True) = True
With .Parent
.StartOf Unit:=wdParagraph, Extend:=wdMove
.InsertAfter "Tip: "
.Move Unit:=wdParagraph, Count:=1
End With
Loop
End With
How I can browse all heading types? This example generates always new
heading and after that inserts the word "Tip:". My target is only
insert file after heading, how to modify code?
Thank you