N
News.Microsoft.com
How do I tie a document object to the one I just opened. The document I end
up saving is blank. Somehow I need to get the one I just opened into the
document object that is being saved.
Dim MyWord As Word.Application
Dim WordDoc As Word.Document
Set MyWord = New Word.Application
With MyWord
.Documents.Open ("c:\test.doc")
Set WordDoc = MyWord.Documents.Add
WordDoc.SaveAs "c:\test1.doc"
DoEvents
Set MyWord = Nothing
Set WordDoc = Nothing
up saving is blank. Somehow I need to get the one I just opened into the
document object that is being saved.
Dim MyWord As Word.Application
Dim WordDoc As Word.Document
Set MyWord = New Word.Application
With MyWord
.Documents.Open ("c:\test.doc")
Set WordDoc = MyWord.Documents.Add
WordDoc.SaveAs "c:\test1.doc"
DoEvents
Set MyWord = Nothing
Set WordDoc = Nothing