?
Solved

Opening a Word Document from MS Access 2010

Posted on 2014-09-15
2
Medium Priority
?
1,609 Views
Last Modified: 2014-09-15
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
0
Comment
Question by:PerksP
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Wilder_Admin earned 2000 total points
ID: 40322828
Use that instead:

Private Sub Command30_Click()
Application.FollowHyperlink "T:\G4\Maint\Fac Reports.doc"
End Sub
0
 

Author Comment

by:PerksP
ID: 40322856
Great, that worked.  Many thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question