Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Solved: Open word doc with command button in access


(!)

jmk909er's Avatar
jmk909er jmk909er is offline jmk909er has a Profile Picture
Computer Specs
Member with 322 posts.
THREAD STARTER
 
Join Date: May 2009
Location: San Diego, CA
Experience: learn by trial and error
11-Jan-2011, 02:36 PM #1
Solved: Open word doc with command button in access
Is there a simple way to open a word doc with a command button in access?
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,440 posts.
 
Join Date: Mar 2005
Location: UK
11-Jan-2011, 03:00 PM #2
Yes, do you need to browse to it?
karlhaywood's Avatar
karlhaywood karlhaywood is offline
Account Closed with 680 posts.
 
Join Date: Jan 2010
11-Jan-2011, 03:29 PM #3
If your going to open the same word doc everytime you press the button you could try

Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "c:\Doc1.doc"
If Dir(LWordDoc) = "" Then
MsgBox "Document not found."
Else
'Create an instance of MS Word
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True
'Open the Document
oApp.Documents.Open filename:=LWordDoc
End If
End Sub

You will need to put in the correct file path of the document you want to open.
jmk909er's Avatar
jmk909er jmk909er is offline jmk909er has a Profile Picture
Computer Specs
Member with 322 posts.
THREAD STARTER
 
Join Date: May 2009
Location: San Diego, CA
Experience: learn by trial and error
11-Jan-2011, 03:46 PM #4
Thanks Guy's I found a solution:

Private Sub Command30_Click()
Application.FollowHyperlink "T:\G4\Maint\Fac Reports\M2R2Weekly Planning Status xcel document\MCRD Projects\MCRD Projects Input Worksheet.doc"
End Sub
Email This Email  Print This Print  Bookmark This Bookmark  Tweet This Send to Facebook Send to MySpace Send to StumbleUpon Digg This | More Services More
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 


Similar Threads
Title Thread Starter Forum Replies Last Post
Restrictions on computer prevent opening Word docs from a forum Lakeridge Business Applications 7 05-Mar-2010 04:44 AM
Access: Open new form with control button? Sam_NYC Business Applications 4 10-Jul-2009 11:38 AM
opening word docs with a mac computer mardigrasvet Business Applications 2 19-May-2009 06:39 PM
Solved: Office 2K: FAX a Word doc to clients, # in Access, @ merge Outlook wants # from conta SteveO_RR Business Applications 4 21-Nov-2006 12:25 AM
Command buttons in Access 2000 forms The G-man Business Applications 0 13-May-2003 09:00 PM

WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑