I have code that establishes a file location to save and it works for saving the Excel just fine. I need to also open a Word Document in Read Only and save a copy to the new location (the template can be opened by multiple people at any time). Here is the code I have but it fails at the ActiveDocument.SaveAs line.
Dim wordapp As Object
Dim SavePath As String
Dim TempFilePath As String
SavePath = Application.ActiveWorkbook.Path
TempFilePath = SavePath & "\"
Set wordapp = CreateObject("word.Application")
wordapp.Documents.Open ("T:\Forms Template - All States\RCS\Issues Memo Appendix 9-5-6.doc"), ReadOnly:=True
wordapp.Visible = True
MsgBox (TempFilePath & "Issues Memo Appendix 9-5-6")
ActiveDocument.SaveAs FileName:=TempFilePath & "Issues Memo Appendix 9-5-6" + ".doc", FileFormat:=wdFormatDocument
I get a Run-time error '424': Object Required.
I tried changing the "Dim wordapp As Object" to "Dim wordapp as Word.Document" but get a Compile error: User-defined type not defined error, which causes the code to not run at all.
Bookmarks