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!

Hyperlink in Report print to PDF

Status
Not open for further replies.

LJtechnical

Technical User
Aug 7, 2002
90
0
0
GB
Hi All,

I have a successful report which lists products in a quotation entered via a form. This report can then be printed automatically to PDF format and hence emailed to customers.

I would really like the report to include hyperlink information to the product information sheets on our website.

Ideally a generic label or image that carries a hyperlink for relevant product.

I have tried to no avail the following in the product detail section of the report OnFormat Event.


Dim hlk As Hyperlink
Dim strAddress As String

If IsNull(Me!Factsheet) Then ' If no hyperlink exists then
Me!LinkLabel.Visible = False

Else ' If hyperlink exists for product then
Me!LinkLabel.Visible = True
strAddress = Me!Factsheet ' strAddress equals the hyperlink
Set hlk = LinkLabel.Hyperlink
With hlk
.TextToDisplay = "Factsheet"
.Address = strAddress
End With
End If

Iget the Label appearing with the Text "Factsheet" displayed but not the associated hyperlink, any ideas?

David
 
LJtechnical,
[tt]...
.TextToDisplay = strAddress
...[/tt]

Now here's the rub, if your using the Adobe virtual printer (v 6 or older) to create the pdf the link will not be active (the report will only show the address).

CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Hi LJTechnical,

I have almost the same situation as you but one step behind.

How do you automatically get your reports to print to PDF?
When they are automatically printed to PDF do they have different names or do you have to rename them? When I print them to PDF it takes the name of the "Caption" under the reports Properties options.

I have alot of MSDS sheets to export and I have to do that manually.

I would really appreciate any feedback,
Z
 
Look at this post for how to print to PDF. It will allow you to have the reports named programattically.

Programmatically create a PDF from Access 2002
thread707-1119207

Without code, a quick way is to set default printer to PDF, run your reports and then set default printer back to your regular printer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top