I'm using 2010 versions of Excel and Word.
When my Excel workbook, TT.xlsm, is opened, Workbook_Open() calls a local Sub, OpenAWordDocument, which, in turn, opens a Word document.
Sub OpenAWordDocument(Optional ByVal DocName As String = "", Optional ByVal DocPath As String = "")
Dim objWord As Object
If Len(Trim(DocName)) = 0 Then
DocName = "Word Document.docx"
If Len(Trim(DocPath)) = 0 Then
DocPath = "D:\Documentation"
If Right(DocPath, 1) <> Application.PathSeparator Then
DocPath = DocPath & Application.PathSeparator
'Open an existing Word Document from Excel
Set objWord = CreateObject("Word.Application")
.Visible = True
.Documents.Open DocPath & DocName
Set objWord = Nothing
I would appreciate some help developing a procedure to call from Workbook_BeforeClose() which will Save and Close the Word document without requiring operator intervention.