BrI
06-08-2017, 12:29 PM
Working from excel, I want to Save an already open Word doc and then do a SaveAs to a new directory. Both docs should be closed when finished.
The following are my beginning efforts, I'm having problems as indicated.
Sub SaveWordFromExcel()
Dim objWord
Set objWord = CreateObject("Word.Application")
Dim objDoc As Object
objWord.Visible = True
'The doc is already open, but tried using ".Open" as below to get file path reference
'Result is dialog box saying "File In Use .... Do you want to open read only"
Set objDoc = objWord.Documents.Open("C:\***x\Word Test 1.doc")
objDoc.Save
objDoc.SaveAs ("F:\***x\Word Test 1.doc")
End Sub
Any assistance would be appreciated.
The following are my beginning efforts, I'm having problems as indicated.
Sub SaveWordFromExcel()
Dim objWord
Set objWord = CreateObject("Word.Application")
Dim objDoc As Object
objWord.Visible = True
'The doc is already open, but tried using ".Open" as below to get file path reference
'Result is dialog box saying "File In Use .... Do you want to open read only"
Set objDoc = objWord.Documents.Open("C:\***x\Word Test 1.doc")
objDoc.Save
objDoc.SaveAs ("F:\***x\Word Test 1.doc")
End Sub
Any assistance would be appreciated.