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
Solved

Opening a Word Document from MS Access 2010

Posted on 2014-09-15
2
1,165 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
2 Comments
 
LVL 8

Accepted Solution

by:
Wilder_Admin earned 500 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

840 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