Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Print Hyperlinked document from Access Report? 2

Status
Not open for further replies.

Odis

Technical User
Jan 25, 2001
78
US
I've searched for this, but only found how to print a hyperlink image. Is there a way to run a report and if one of the fields is a hyperlink to a document, can it be opened and printed within the running of the report? I'm not a VB person, but I am familiar with a lot of controls property settings. Running XP and MS 2003. Docuemnt is linked from a ShrePoint Site.

Thanks
 
If all the links are to the same type of content you may be able to find an Active X control for that document type. It is unlikely that it would take a hyperlink, although it would likely take a path and filename which is embedded in the hyperlink.

Hyperlinks can be manipulated as a string based on the following format:

#Display Text#Address#Sub Address#

If you can find an appropriate control, we can get the address piece out of the hyperlink you need.
 
I don't believe you can interact with an Access report... Perhaps use a form?

Let them hate - so long as they fear... Lucius Accius
 
I'm still a little confused. I'm not real familiar with ActiveX controls. Put yourself in my shoes and tell me how you would do this: I am in MS Access 2003. I am running a report that inputs a linked table from a Sharepoint Site. A field in the Linked table is a hyperlink to a WORD document contained in SharePoint. During the running of the Access Report, I want to print the WORD Document as part of the report from Access.

I'm not sure Access is even capable of doing this, but I thought I would check. THANKS
 
The first thing I would try is dragging and dropping a file of the type in question in the report and see what type of control you get.

Then on the control tool bar there is a hammer and toolbox type icon (similar to the one that toggles the cotrol toolbar on and off) which is the more controls buttons. That lists all the activex controls registered in your computer... In my attempts I could embedd a Word document, but couldn't figure out how to link to it.
 
I would also add that a Google search turns up a number of ActiveX Word Viewer controls when you search. Looked like you have to pay for most or all of them. It seems like it should be possible to use a control to link to a Word document natively in Office.
 
Odis,
May I suggest adding code to open the Word document to a button on a form which would also have underlying code (OnClick) to run the report. This way, you'd get both taken care of with a single click and they would open one after the other.

Search for "FollowHyperlink" in the VBA help and substitute a reference to the field holding the stored hyperlink for the InputBox("Enter a valid address") part.You should be able to modify the vba in the example sufficiently to get what you're looking for.


Let them hate - so long as they fear... Lucius Accius
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top