Run Word 2010 sub Routine from Access

Hdata

Registered User.
Local time
Today, 12:31
Joined
Sep 10, 2013
Messages
56
I'm trying to run a word 2010 sub routine from the Access 2010 module. So far I have been able to launch a word document with attached word template from the Access module. I have many subs located in an attached word template which I have not been able to launch from Access.
Any suggestions, and thanks in advance.
 
Past the below code into a module in MS-Access.
Remember to set the references to the Word Library in MS-Access.

Code:
  Dim WD As Object
  
  Set WD = CreateObject("Word.Application")
  WD.Documents.Open "C:\YourPath\YourDocumentName.Doc"
  WD.Run "YourSubName"
 

Users who are viewing this thread

Back
Top Bottom