Hi all,
This error is blowing my mind at the moment. The basic gist is that, launching from Excel, I am using a word doc as a template with bookmarks to be populated with data from Excel. My problem is when I go to name and save the file with a custom pathname, it won't take. (though copying the exact same code and assigning to fill a blank cell works just fine). Currently it is like such:
If IsAppRunning("Word.Application") = True Then
Set wdApp = GetObject(, "Word.Application")
Else
Set wdApp = New Word.Application
End If
wdApp.Visible = True
Set myDoc = wdApp.Documents.Open("H:\Document Template.doc")
**** omitting bookmark code, as problem isn't there****
myDoc.SaveAs FileName:=("H:\Email Docs\" & Year(Cells.Find("Date").Offset(1, 0)) & "\" & _
Cells.Find("Code").Offset(1, 0) & " " & Cells.Find("Index").Offset(1, 0) & " " & _
Format(Cells.Find("DateTime").Offset(1, 0), "dd mmm") & ".doc")
Debugging, when I assign a new variable the same code, the pathname is appearing/populating properly from the other cells. Also, if I manually enter the same text that the formula puts together, it also works. I just don't know why my instance of the Word Application is not letting me save.
Would deeply appreciate help, I can't figure it out!
Bookmarks