Saving a Document with another name [resolved]
In my application i open up a document in word with the following code, once i do all of my precessing on that document using my vb app, how do i get Word to save the file with a different name. Example Abc.doc gets saved as completedproject.doc.
VB Code:
With WordObject
.Documents.Open ("c:\abc.doc")
End With
Thanks for you help.
Re: Saving a Document with another name
Moved from Calssic VB forum. :)
Re: Saving a Document with another name
You can use the .SaveAs method to save the current document as whatever filename you want but that still leaves the document thin king its not saved so you can use the .Saved property to make it think its saved.
VB Code:
With WordObject
.Documents.Open ("c:\abc.doc")
'Do some stuff to the doc
'Blah, blah, blah....
'Save document as something else
.Documents("C:\abc.doc").SaveAs FileName:="C:\SomethingElse.doc"
.Documents("c:\abc.doc").Saved = True
End With
Re: Saving a Document with another name
Thanks RobDog888, exactly what i was looking for.