I have built several customer sub routines in word that process various aspects of documents. I would like to be able to call the routines (custom sub) from within Excel VBA.
I am able to get the word document open from within XL... using code similar to the following. I have been unable to figure out the syntax to call the customer Word Subroutine. Any help would be greatly appreciated.
I am able to get the word document open from within XL... using code similar to the following. I have been unable to figure out the syntax to call the customer Word Subroutine. Any help would be greatly appreciated.
Code:
Sub XltoWord()
Dim InputDocName As String, WApp As Word.Application, WordDoc As Word.Document
InputDocName = "D:\Test.doc"
Set WApp = Word.Application
WApp.Documents.Open FileName:=InputDocName, ReadOnly:=False
Set WordDoc = WApp.ActiveDocument
'need to call custom word routine to process document
'---> This is where I require help
End Sub