R
RNP
I am attempting to port VB code from Windows NT 4.0 to XP
pro version 2002 SP1. The code instantiates MS Word to
open, modify, print and save a document. The document is
stored in Unicode format. Word 97 SP-2 is on the NT and
Word 2003 is on the XP. The following code no longer
saves correctly. Nine additional lines are added to the
end of the file. The first line has two question marks
and a line feed/carriage return and the second line has
just a line feed/carriage return. This pattern repeats
three more times. Then there is one additional line with
just a line feed/carriage return. Any help is appreciated.
Dim objDocument As Object
Set objDocument = .Documents.Add(strDefaultTemplatePath _
& "magic.dot")
With objDocument
.ActiveWindow.Selection.InsertFile _
FileName:=astrFileName, Range:="", _
ConfirmConversions:=False, Link:=False, _
Attachment:=False
.SaveAs astrFileName, _
FileFormat:=mgwdFormatUnicodeText
.Activate
End With
pro version 2002 SP1. The code instantiates MS Word to
open, modify, print and save a document. The document is
stored in Unicode format. Word 97 SP-2 is on the NT and
Word 2003 is on the XP. The following code no longer
saves correctly. Nine additional lines are added to the
end of the file. The first line has two question marks
and a line feed/carriage return and the second line has
just a line feed/carriage return. This pattern repeats
three more times. Then there is one additional line with
just a line feed/carriage return. Any help is appreciated.
Dim objDocument As Object
Set objDocument = .Documents.Add(strDefaultTemplatePath _
& "magic.dot")
With objDocument
.ActiveWindow.Selection.InsertFile _
FileName:=astrFileName, Range:="", _
ConfirmConversions:=False, Link:=False, _
Attachment:=False
.SaveAs astrFileName, _
FileFormat:=mgwdFormatUnicodeText
.Activate
End With