Opening a Word Document from MS Access 2010

I hope someone can help.

I have been using the following code successfully in a database that was written in Access 2003.  When I try to use it in an Access 2010 database I get a Run time Error 424 Object Required on line Set WordDoc.  I have checked references and Access 14.0 Object Library, Word Object Library 14.0 are both set.  Is there a different coding needed for 2010?

   'Open Word Document for Merge
   
   Dim WordApp, WordDoc As Object
   Set WordApp = CreateObject("Word.Application")
   
   Set WordDoc = WordApp.Documents.Open(Forms!HomePage_TaskList!DocumentsFolders & Me.Letters.Column(2))
   WordApp.Visible = True
PerksPAsked:
Who is Participating?
 
Wilder_AdminConnect With a Mentor Commented:
Use that instead:

Private Sub Command30_Click()
Application.FollowHyperlink "T:\G4\Maint\Fac Reports.doc"
End Sub
0
 
PerksPAuthor Commented:
Great, that worked.  Many thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.