473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

FollowHyperlink not working with pdf file

There is a screen for printing various form in an application I have. Some of them integrate data into the forms, but a few are just there so the users can grab standard forms while they're in the screen. So I have been using command buttons that say what form it will open. The code that goes with the command button is as follows:

Dim Path As String
Path = DLookup("[Path]", "Region Data") & "\Common"
strInput = Path & "\ECIS.pdf"
Application.FollowHyperlink strInput, , False

I just had to change this particular form. The old form was a Word document and the new form is a pdf document. So all I changed was the extension in the code form ".doc" to ".pdf". It worked fine before, now it just opens Acrobat Reader, but doesn't bring the document in. And that, my friends, is my problem.

P.S. Don't worry about the path definition - I'm sure this is correct.

Thanks you.
Apr 11 '08 #1
5 5712
nico5038
3,080 Expert 2GB
Strange problem, looks like the problem is Acrobat-Reader and not Access related.
Are you sure the correct version of the reader is installed ?

An alternative might be to start the application using the SHELL() function.

Nic;o)
Apr 13 '08 #2
ADezii
8,834 Expert 8TB
There is a screen for printing various form in an application I have. Some of them integrate data into the forms, but a few are just there so the users can grab standard forms while they're in the screen. So I have been using command buttons that say what form it will open. The code that goes with the command button is as follows:

Dim Path As String
Path = DLookup("[Path]", "Region Data") & "\Common"
strInput = Path & "\ECIS.pdf"
Application.FollowHyperlink strInput, , False

I just had to change this particular form. The old form was a Word document and the new form is a pdf document. So all I changed was the extension in the code form ".doc" to ".pdf". It worked fine before, now it just opens Acrobat Reader, but doesn't bring the document in. And that, my friends, is my problem.

P.S. Don't worry about the path definition - I'm sure this is correct.

Thanks you.
'Path' is a Property that is used to determine the location of information stored through the CurrentProject or CodeProject Objects of an Access Project or Database. It should never be used within a Variable Declaration, try changing it.
Apr 13 '08 #3
ADezii
8,834 Expert 8TB
There is a screen for printing various form in an application I have. Some of them integrate data into the forms, but a few are just there so the users can grab standard forms while they're in the screen. So I have been using command buttons that say what form it will open. The code that goes with the command button is as follows:

Dim Path As String
Path = DLookup("[Path]", "Region Data") & "\Common"
strInput = Path & "\ECIS.pdf"
Application.FollowHyperlink strInput, , False

I just had to change this particular form. The old form was a Word document and the new form is a pdf document. So all I changed was the extension in the code form ".doc" to ".pdf". It worked fine before, now it just opens Acrobat Reader, but doesn't bring the document in. And that, my friends, is my problem.

P.S. Don't worry about the path definition - I'm sure this is correct.

Thanks you.
'Path' is a Property that is used to determine the location of information stored through the CurrentProject or CodeProject Objects of an Access Project or Database. It should never be used within a Variable Declaration, try changing it. It is also the name of a Field in the Region Data Table leaving a lot of room for ambiguity.
Apr 13 '08 #4
'Path' is a Property that is used to determine the location of information stored through the CurrentProject or CodeProject Objects of an Access Project or Database. It should never be used within a Variable Declaration, try changing it. It is also the name of a Field in the Region Data Table leaving a lot of room for ambiguity.
I changed the variable name to PathA and it did the trick. Thanks. Sorry it took me so long to reply. I've been out of the office for a while.
Apr 24 '08 #5
ADezii
8,834 Expert 8TB
I changed the variable name to PathA and it did the trick. Thanks. Sorry it took me so long to reply. I've been out of the office for a while.
Not a problem, glad you were able to arrive at the solution.
Apr 24 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Colleyville Alan | last post by:
I could not find this in the help file, so here goes... I have some code that opens a word doc which is then set to a variable called Target. Then a FollowHyperlink opens another word doc that...
2
by: AlastairHardwick | last post by:
Hi, Wonder if you can help? I have an Image Management Database which holds various information relating to Ghost Images and Testing. I am using a textbox with a hyperlink to display the path...
3
by: df | last post by:
In the old days of Visual Basic for Applications, I successfully opened a file (of any file type: .dwg .pdf .doc etc) in its own application using: ActiveWorkbook.FollowHyperlink...
1
by: BLez007 | last post by:
Has anyone ever come across this problem before, or got any insight as to what may be causing it... I am using application.followhyperlink to open files in a directory from an MS Access form......
2
by: BLez007 | last post by:
Has anyone ever come across this problem before, or got any insight as to what may be causing it... I am using application.followhyperlink to open files in a directory from an MS Access form......
0
by: mpfohl | last post by:
How do I use the FollowHyperlink method to go to a .asp website and automatically enter in the parameters to run a search and go to the search results page? E.g., if the site is a driving...
7
by: fpesante | last post by:
Hi, I I'm trying to create a form on database that user can choose and adress from a list box then click on a command button and they will be able to open the site. I am not able to retreive the...
1
by: BASSPU03 | last post by:
When I click on a linked file on my form, I use the following code to execute the corresponding application (e.g. IE, Word, Excel): Private Sub FilePath_Click() Rem Me! Dim stlink As...
5
by: Ruben | last post by:
Hello, I am using the "Application.FollowHyperlink strFilePath, , True" line of code from within access forms to launch any file type I want (e.g., xls, doc, pdf, etc.). The files open up okay,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.