I've written some code which opens a PDF file using :
"Application.FollowHyperlink strdbFilePath & strFileName, , True"
The user then types some information into the form and then clicks a
button which generates a new filepath for the file. Unfortunatly, if
the user doesn't close the PDF file, the whole thing grinds to a halt.
Just wondering if there is some code that I could put in the button to
close the pdf file when clicked??
Cheers
Reg 3 14537
Regnab wrote:
I've written some code which opens a PDF file using :
"Application.FollowHyperlink strdbFilePath & strFileName, , True"
The user then types some information into the form and then clicks a
button which generates a new filepath for the file. Unfortunatly, if
the user doesn't close the PDF file, the whole thing grinds to a halt.
Just wondering if there is some code that I could put in the button to
close the pdf file when clicked??
Cheers
Reg
Check out http://www.mvps.org/access/api/api0007.htm http://www.mvps.org/access/api/api0013.htm http://www.mvps.org/access/api/api0025.htm
One of these should help.
With 13, and some mods on your part, you can get both class and caption.
I like http://www.mvps.org/access/api/api0018.htm to open up files
instead of FollowHyperLink. I can control the window state and I can
have the user dblclick instead of single click like a hyperlink part (I
separate the display text from the address and use the dblclick event).
Thanks Salad,
Works a treat. Might be pushing my luck a little now, but is it
possible to close the file rather than the application. What you've
pointed me to works great and will do what I need.... but in the ever
growing desire to make one's databases a little more effecient, is it
possible to close just the file (as I think this would make subsequent
pdf file opening quicker if adobe is already running).
The other thing you mentioned that I was curious about is it allows you
to control the window state. What does that mean?
Thanks for all your help
Cheers
Reg
Regnab wrote:
Thanks Salad,
Works a treat. Might be pushing my luck a little now, but is it
possible to close the file rather than the application. What you've
pointed me to works great and will do what I need.... but in the ever
growing desire to make one's databases a little more effecient, is it
possible to close just the file (as I think this would make subsequent
pdf file opening quicker if adobe is already running).
You might want to google around...see http://groups.google.com/advanced_search
and enter
*Access*
in the groups texbox and something like
Adobe automation
in the search for.
If Adobe allows automation, you'll probably find some code to do a
file/close or file/save
The other thing you mentioned that I was curious about is it allows you
to control the window state. What does that mean?
Min, Max, etc.
>
Thanks for all your help
Cheers
Reg This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: simon place |
last post by:
Spent some very frustrating hours recoding to find a way of closing a server
socket, i'd not thought it would be any problem,
however, after complete failure and as a last resort, i looked at the...
|
by: Atulvid |
last post by:
Hi,
I created a test file for my application by writing structures to a
binary file. To make sure that I will get correct data for the
pointers inside the structure, i wrote actual data they...
|
by: MuZZy |
last post by:
HI,
I have a user control, say with one textBox.
I need the following: when the user closes form (either calling Form.Close, or pressing "X" or anyhow),
UserControl copies a file from a...
|
by: Charles Law |
last post by:
For some reason, when I click the X to close my MDI parent form, the action
appears to be re-directed to one of the MDI child forms, and the parent
remains open. I am then unable to close the...
|
by: Carroll, Barry |
last post by:
Greetings:
Please forgive me if this is the wrong place for this post. I couldn't find a more acceptable forum. If there is one, please point me in the right direction.
I am part of a small...
|
by: Steven D'Aprano |
last post by:
Closing a file can (I believe) raise an exception. Is that documented
anywhere? I've spent a lot of frustrating time trying to track this down,
with no luck, which suggests that either my...
|
by: Paul Rubin |
last post by:
it looks like contextlib.closing fails to be idempotent,
i.e. wrapping closing() around another closing() doesn't work.
This is annoying because the idea of closing() is to let you
use legacy...
|
by: buu |
last post by:
I have an app made in vb.net with a part of it made in vc.net.
after finishing a data processing with a file, I would like to delete that
file, but file remains locked
to be sure, I was:
-...
|
by: Simon van Beek |
last post by:
Dear reader,
By opening an application I get always the main Access window with the
closing cross in the above right corner. Is there a possibility to make
this closing cross invisible?
...
|
by: Fr33dan |
last post by:
Hi,
I'm having trouble with a multi-threaded program crashing on a specific machine when the worker thread is not initialized at when the _FormClosing method of my main form called.
Here is my...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |