I have a long bit of code that at one point saves a Word document and then saves it again with a new name and the old (legacy) .doc extension.
This all works find when the user is running Office 2007. However, it errors out for anyone using Office 2010. The reference libraries are all correct (as far as I know).
Can anyone point me towards a solution.
This all works find when the user is running Office 2007. However, it errors out for anyone using Office 2010. The reference libraries are all correct (as far as I know).
Can anyone point me towards a solution.
Code:
Dim myDoc As Word.Document
Dim saveAsName as String
saveAsName = "some text here" + ".doc"
myDoc.Save
myDoc.SaveAs fileName:=(saveAsName), FileFormat:=wdFormatDocument