
Opening Merge Document tries to remerge the document
I have a macro in Word 97 that is called from a vb6 program. The vb6
program creates the data files (3 different comma dilimited text) then
calls the macro. The macro reads each of these 3 files 1 at a time
and creates several small documents. The documents are then all
placed into 1 big document (the end result).
The problem comes when I try to save the document then reopen it. If
I step through the macro I can see the document looks fine (all page
breaks in the correct places borders, graphics/logos in the right
place) before I save it. When I save close and reopen (see code
below) it looks terrible. The page breakes are gone, images are the
wrong size etc... What makes me think it is trying to remerge the
document is the when you look at the page special characters we use
the delete from the document are back. Almost like it is linking the
file instead of saving the new final document.
This macro was origionally created in wordbasic and is now being
converted to vba. I left the wordbasic code in to see if anybody
knows if I am converting it wrong.
'WordBasic.FileSave
ActiveDocument.Save
'Sets Recent File List to 1 so User does not see list of temp
files
'WordBasic.ToolsOptionsGeneral RecentFileCount:=1
Application.RecentFiles.Maximum = 1
'Sets Recent File List to default of 4, does not reshow temp files
'WordBasic.ToolsOptionsGeneral RecentFileCount:=4
Application.RecentFiles.Maximum = 4
'By closing the document file and then reopen it we are able to
'delete the temporary files after this section
'WordBasic.FileClose 2
ActiveDocument.Close savechanges:=wdDoNotSaveChanges
'WordBasic.FileOpen Name:=DocName$
Documents.Open FileName:=DocName$
ActiveWindow.View = wdPageView
Any help would be greatly appriciated.
mb.