E
Ebbe
Hey!
In a macro, that types in text controlled by a ASCII text file,
there is a possibility to change headers/footers by inserting a
new .doc file after making a break-new-page.
I have discovered that Word automatically add a blank line
in the top of the inserted document. This have the effect that
I am going on typing in text starting at line 2 instead of line 1.
I have made a work-around by issuing a backspace to delete
this extra line before beginning typing in.
Can anyone tell me why this extra line is inserted?
Can anyone tell me who to avoid this extra line?
My code with the work around:
-----------------------------------------------------
Private Sub ShowTheProblem
Selsction.TypeText "Last line on a page"
Selection.InsertBreak Type:=wdSectionBreakNextPage
Selection.InsertFile FileName:=NewBaseDoc(NewBaseDocNo), _
Range:="", ConfirmConversions:=False, Link:=False, _
Attachment:=False
Selection.TypeBackspace '**** Work around ****
Selsction.TypeText "First line on next page"
End Sub
In a macro, that types in text controlled by a ASCII text file,
there is a possibility to change headers/footers by inserting a
new .doc file after making a break-new-page.
I have discovered that Word automatically add a blank line
in the top of the inserted document. This have the effect that
I am going on typing in text starting at line 2 instead of line 1.
I have made a work-around by issuing a backspace to delete
this extra line before beginning typing in.
Can anyone tell me why this extra line is inserted?
Can anyone tell me who to avoid this extra line?
My code with the work around:
-----------------------------------------------------
Private Sub ShowTheProblem
Selsction.TypeText "Last line on a page"
Selection.InsertBreak Type:=wdSectionBreakNextPage
Selection.InsertFile FileName:=NewBaseDoc(NewBaseDocNo), _
Range:="", ConfirmConversions:=False, Link:=False, _
Attachment:=False
Selection.TypeBackspace '**** Work around ****
Selsction.TypeText "First line on next page"
End Sub