Solved

MS Access 2010 How can I open a Word document from within Access?

Posted on 2012-04-09
7
682 Views
Last Modified: 2012-04-09
I'd like to be able to hyperlink to a Word document by clicking a button on an Access 2010 form.   I can't seem to find a macro to do this, and I'm not familiar enough with VBA (yet) to do it. (I just starting to learn VBA.)  

I know I can create a hyperlink from a field within a table, but I'd like to hyperlink to the document directly from the form.

Can you help me with this?   Thanks.  WallyTee
0
Comment
Question by:WallyTee
7 Comments
 
LVL 12

Assisted Solution

by:xmlmagician
xmlmagician earned 100 total points
ID: 37824321
0
 
LVL 39

Assisted Solution

by:als315
als315 earned 100 total points
ID: 37824326
Test this sample:
DBHyperlink.accdb
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 100 total points
ID: 37824363
In the click event of a button, use:

application.followhyperlink "C:\foldername\filename.doc"
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 100 total points
ID: 37824470
See:    Hyperlinks: warnings, special characters, errors

I prefer to use the ShellExec API to avoid the issue with Hyperlinks.  Here is an example I created: Document Links
0
 

Author Comment

by:WallyTee
ID: 37824663
Thanks to all.  I'll give your suggestions a shot and see how far I can get.   WallyTee
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37824981
<No Points wanted>

<I'd like to be able to hyperlink to a Word document by clicking a button on an Access 2010 form.   I can't seem to find a macro to do this, and I'm not familiar enough with VBA (yet) to do it. (I just starting to learn VBA.)  >
A Macro cannot "create" a hyperlink, nor can it be easily made to Follow one.
0
 

Author Closing Comment

by:WallyTee
ID: 37825118
Thanks again to all.   You can close this one out.   WallyTee
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now