Closing a PDF file from VBA

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

0
p.heywood (76)
8/8/2006 9:37:10 AM
comp.databases.ms-access 42534 articles. 0 followers. Post Follow

3 Replies
717 Views

Similar Articles

[PageSpeed] 29
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).
0
oil (4048)
8/8/2006 3:04:04 PM
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

0
p.heywood (76)
8/8/2006 10:57:42 PM
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
> 
0
oil (4048)
8/9/2006 12:38:48 AM
Reply:
Similar Artilces:

image retrieval using automatic image annotation and region based inverted file
please anyone tell me,whether the topic image retrieval using automatic image annotation and region based inverted file can implement? ...

How to close a shell window automatically
In my AutoExec.sas I have: x copy C:\SASTextFiles\SASLog.txt C:\SASTextFiles\SASLogOld.txt; This works fine but the shell windows stays open. How do can make it close automatically after it has done the command? On 13 Sep, 17:21, mpa...@ODOT.ORG (Masoud Pajoh) wrote: > In my AutoExec.sas I have: > > x copy C:\SASTextFiles\SASLog.txt C:\SASTextFiles\SASLogOld.txt; > > This works fine but the shell windows stays open. > > How do can make it close automatically after it has done the command? Try XSYNC with NOXWAIT and run your commands as systask command ...

Problem exporting pdf in Pagemaker 7.0
When I export within Pagemaker, the elements on the right side of first page shifted 90 degrees. 2nd page is fine. The photograph on the right side didn't move, nor the graphics on the left side. Any help would be appreciated. In article <a54fdd90-497b-42e8-9a72-f7f6bba5d8bc@1g2000pre.googlegroups.com>, elleng2533@gmail.com wrote: > When I export within Pagemaker, the elements on the right side of > first page shifted 90 degrees. 2nd page is fine. The photograph on > the right side didn't move, nor the graphics on the left side. > > Any help wo...

writing binary files
I am trying to convert an ANSI encoded ASCII text file to a binary file. I have looked at the b2a_qp( data[, quotetabs, istext, header]) function at http://aspn.activestate.com/ASPN/docs/ActivePython/2.3/python/lib/module-binascii.html but I am not sure if it will do what I need it to or how set it up to take the data. Also, the parts of this that really make it an issue is that the data is coming off of a DOS machine (so endian is a concern here right?) and is a rather large text file with a ton of scientific data points (from 500k to 5MB files). Any help would be greatly appreciated...

"Close match" regex
I was wondering if there were a built-in pattern finder to get a close match on strings. Our users are constantly omitting dashes, dots, and spaces from software release labels. And when you look at the list with intelligent eyes, you see it's obvious what they meant. software_version-2.4.5 = = software-version_245 You get the idea. Anyone have a regex solution? Thanks in advance Bill William Hymen wrote: > I was wondering if there were a built-in > pattern finder to get a close match on strings. I think there is some module that attempts to do it, but I don't know ...

[ace-users] server closes connection
--0-348674199-1063197416=:85473 Content-Type: text/plain; charset=us-ascii Hi Ace-users, In a client-server application; when server closes connection , client gets -1 only one time and it prints it on screen. This works in Windows 2000 but when I try this in Solaris I see that " -1 "comes from server many times and client prints these messages.approximately, 21 times. Why do this happen?I use Reactor for select() mechanism . I think different select mechanism causes this. Is it possible that Solaris kernel sends -1 many times or what else? Thanks. Sincerely ---------------------...

Matlab closes down at launch
Does anyone knows why matlab 7 closes down at launch. Just to inform that my windows is Xp and my processor is AMD ...

Bug? File::Temp messing with @INC
Hi all, I've recently upgraded to perl 5.8.7 and noticed something that is quite annoying - File::Temp is fiddling with the order of the paths in @INC (or at least some library it loads is - haven't quite found the problematic code). Example: > perl -e 'use lib "/path/to/my/libs"; print join("\n", @INC), "\n"' /path/to/my/libs /usr/local/lib/perl5/site_perl/5.8.7/mach /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.7/BSDPAN /usr/local/lib/perl5/5.8.7/mach /u...

Reverse document order in pdf file
Hi all. I am a user of Acrobat Standard 7.0.7 and need to know if there is a way to reverse the order of documents in a file. Thanks in advance, Ken address@server.com wrote: > I am a user of Acrobat Standard 7.0.7 and need to know if there is a > way to reverse the order of documents in a file. > Thanks in advance, Ken psutils But why do you want to do it? -- Eric Try http://www.lowagie.com/iText/itext.jnlp Tools->Manipulate->ReversePages address@server.com schrieb: > Hi all. > I am a user of Acrobat Standard 7.0.7 and need to know if there is a > way to revers...

Breaking_into_computer_networks_from_the_Internet.pdf
http://rapidshare.com/files/49673541/Breaking_into_computer_networks_from_the_Internet.pdf ...

Re: HP COBOL closing files. #2
Michael Baier wrote: >>> "KENT WALLACE" wrote: >>> I was coding in VB .NET and failed to close a file. I found that records >>> were missing from the end of the file, maybe 10. Because I had failed to >>> close the file, it failed to clear the buffer. >> >>This shouldn't be a problem in COBOL. COBOL automatically closes all files >>for you as part of normal run unit termination. >> >>Walter >> > > Yes and NO, > > I just learned, that there could be a problem with some files. ...

What are these files in my TEMP directory??
I couldn't for the life of me figure out why my cpu was telling me that my 37gig hard-drive was full, so I went poking around, and in my C:/Windows/TEMP folder, there were about 150 folders that each were title something like "tmp000076e8"...always starting with 'tmp', then some combination of letters and digits. Each folder contained a single file (with the same title as the folder it was in) in a format that my computer did not recognize that was between 180 and 400 MB in size!! Anyone know what these files were, and why my computer was creating and storing ...

transparency (alpha) in pdf
I'm having a problem trying to apply transparency (alpha) in a pdf document. My Resources dictionary looks like this: /Resources << ... ... /ExtGState << /alpha-fill-50 << /ca 0.5 >> >> ... ... >> And in the page contents stream I'm using: 1 0 0 rg /alpha-fill-50 gs 50 50 100 100 re F Using Acrobat Reader 7 on Windows, the colors appear "darkened", but using Acrobat Reader 7 on Linux it looks fine. Even if I define /alpha-fill-50 without using it, it looks the same. I'd like to know if I'm doing somethi...

One class per file for an Applet ?
An applet that I am writing works fine when run from my local drive in IE. However when run remotely from a website, I receive the following error. java.lang.ClassNotFoundException: Engine All my classes (over which there are around 20) are packed into a single file - Wobbles.class . The html file looks like this: <html> <body> <applet code=Wobbles.class width="460" height="330" > </applet> </body> </html> Should each class be in a separate file ? -Luke "Luke J Crook" <luke@NO-SPAM.balooga.com> wrote in message n...

"Error using save" with MAT files
Our program saves various arrays or cells into a few MAT files. We experience save problems with one of them when writing a given struct. We sometimes get: Error using save Error closing file... or Out Of Memory during serialization of the Subsystem Data Error using save Error closing file... but our PCs have 3Gb+ of RAM and when this happens, the 'memory' command reports at least 500Mb of available memory, so we suspect this "out of memory" error is actually a default message for a failing serialization. Is there any way to pre-validate an array or cells befo...

JavaMail POP3 folder.close() method close also store!
Hi @ll, I was wondering why I lose the connection to the mail store while retrieving information from it without calling the method store.close()! At the end I found out that the method folder.close(boolean) also close the store! Following you see the debug log of the JavaMail API: > C: QUIT > S: +OK POP3 server closing connection I really have to keep the connection alive to the server to get all messages at once from the mail store. But after closing the folder my client is disconnected :o( From my point of view it is not very correct that the API close the connecti...

FAQ 5.29 How can I read in an entire file all at once? 466968
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.29: How can I read in an entire file all at once? Are you sure you want to read the entire file and store it in memory? If you mmap the file, you can virtually load the entire file into a string wi...

mex files #2
Hello, I am new to mex files. What I am trying to do is pass matlab structs (which themselves contain structs, i.e. X.Y.z.P would access an integer, X.Y.f.g would access a float, X.q(2) would access a double, etc.) into the mex gateway routine and then pull the data out and put it into corresponding C structs. is this an easy thing to do? Can someone give me an example? Any help is much appreciated. ...

closing and reusing streams
Dear all, for a bookproject that I'm working on I've inherited a large number of homemade style-files. The problem that I have is that they make heavy use of \@starttoc to write to files, and now the upper limit seems to be reached and I'm getting the dreaded "No room for a new \write" error. From previous postings I've learned that \@starttoc allocates a new stream and/or file number for each TOC, which might not be necessary. As a solution David Wilson (davidw@utopiatype.com) wrote (1999/07/02): > If you are allocating a separate > output stream for each t...

File with hash inside it
I have a file containing the following info: { 'MGT6101' => { 'desc' => 'An examination of the tools and procedures used by organizations to attract, select, and retain employees within the context of the legal and regulatory environment.', 'title' => 'Managing Human Resources' }, 'MGT6015' => { 'desc' => 'The course covers cost estimation, standard costs, variable costing, relevant costs, transfer pricing, performance evaluation, cost of quality, and activity-based costing for service.', '...

No close (x) buttom for the access
Hi, Is it possible to remove the access-application close-button (X) Filip Not per se, but there are ways of preventing its use. See www.mvps.org/access/forms HTH - Turtle "Filips Benoit" <benoit.filips@pandora.be> wrote in message news:r4LTb.141$tH5.112751@phobos.telenet-ops.be... > Hi, > > Is it possible to remove the access-application close-button (X) > > Filip > > Yes, I found time ago (I can not remember where) this VBA code that makes Access "X" disabled; it works perfectly in Access 97 I did not try on newer versions: Put th...

Undelete Utility for .avi files which works?
Does anyone know which undelete utility works to recover an .avi file please? I need it for one avi file which my Archos DVR accidentally deleted. I have tried freeundelete but it recovers it as some type of corrupted DIVX file which I don't seem to be able to repair. I am a bit unwilling to pay to buy a utility which I would use once and which might do the same on this 2 gig file of which I actually need only a few megabytes. I don't think it was designed for avi files although I cant understand how it can recover a file into anything other than the condition it was in...

Hi. I need an example on generating a PDF file using pdf4tcl. Text direction can be Right to Left.
Hi. I need an example on generating a PDF file using pdf4tcl. Text directio= n can be Right to Left. I live in Lebanon which is an Arab country. Account= ing Reports can , of course, be in Arabic. So, kindly please, show me an ex= ample. I tried the example from the pdf4tcl manual. I am getting question marks, a= nd I know the reason is because of the encoding . I also did set the encodi= ng to utf-8 (unicode encoding). and the question marks still appear instead= of the Arabic characters which also must be joined and well rendered. You may test Arabic by copying the following str...

Close button bug
Hello, I have a form in an Access 2003 application which opens maximized. Its CloseButton property is set to false. On this form I have a command button that opens a report in preview mode. The report opens fine. It opens maximized as one would expect. However, the report preview window's close button is disabled which is confusing to my users (they have to click the resize button on the preview window which then restores the close button). Office SP3 does not seem to help. Is there a better workaround than this to restore my report preview close button? I can reproduce this behavi...

Determine File Transfer Rate
Hi, I would like to conduct a test to compare the file transfer rates between 4 AIX servers, but not being familiar on how to do this. Could somebody enlighten me on how to accomplish these tests? thanks in advance I usually just pick a nice big file (500 mb or so) and time the FTP between them, just use the same file in each case. I am not sure if you were looking for something more advanced, but sometimes simple is all that is required. L8R, Jeff "Jay B" <jay08891@hotmail.com> wrote in message news:BJJyb.3624$yd.552602@news20.bellglobal.com... > Hi, > > I wo...