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 42582 articles. 0 followers. Post Follow

3 Replies
872 Views

Similar Articles

[PageSpeed] 38

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 (4047)
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 (4047)
8/9/2006 12:38:48 AM
Reply:

Similar Artilces:

MS Access database with a file extension of .mde
Good day: Can you kindly assist me in opening a MS Access database with a file extension of .mde? I get an error message stating "This database is in an unrecognized format". Any help is greatfull. TIA This usually indicates an attempt to open an Access 2000 database in an earlier version. -- MichKa [MS] NLS Collation/Locale/Keyboard Development Globalization Infrastructure and Font Technologies This posting is provided "AS IS" with no warranties, and confers no rights. "mary" <chloemelmom@yahoo.com> wrote in message news:a0a64947.0311151242.4df0c...

Importing MS Office Excel Comma Separated Values Files into a MS Access 2003 database
Hi, I have been tasked with Importing MS Office Excel Comma Separated Values Files into a MS Access 2003 database. These files were exported from a DB2 database.I have also been given the DDL code. I have Googled a solution to this task and have tried creating these tables using the DDL code in a query within a blank MS Access database. Is there a more expedient way to achieve this? I noticed, for example, that a field in DB2 has a data type of "decimal" while the same field in MS Access 2003 would have the data type of "number". Thanks, Zuf What follows i...

Import MS Office Excel Comma Separated Values Files into a MS Access 2003 database
Hi, I have been tasked with Importing MS Office Excel Comma Separated Values Files into a MS Access 2003 database. These files were exported from a DB2 database.I have also been given the DDL code. I have Googled a solution to this task and have tried creating these tables using the DDL code in a query within a blank MS Access database. Is there a more expedient way to achieve this? I noticed, for example, that a field in DB2 has a data type of "decimal" while the same field would have the data type of "number". Thanks, Zuf What follows is the DDL: -------...

run pdf file from ms access
Am trying to open an Adobe .pdf file from Access2000. I use the following code: Shell "C:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe /c start C:/Temp/Circulation summary.pdf" This starts Adobe Acrobat fine - then I get a message that there was an error opening the document and the file could not be found. If I then clear the error message, the file is right there with no problem. Can some one help opening this file without gtting the error message in the middle? Thank you in advance. Mike Mike wrote: > Am trying to open an Adobe .pdf file from Access2000. > ...

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but...

Accessing Access database files
Is there a JDBC driver or non-JDBC class library that would give a Java program read/write access to the tables and schema in a MS Access database? I don't need to update the database, just examine the schema and table contents. I don't have a copy od the Access software and nowhere to run it because all my computers run Linux. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | On 7/1/2014 9:28 AM, Martin Gregorie wrote: > Is there a JDBC driver or non-JDBC class library that would give a Java > program read/write access to the tables and sc...

Access database
Hi, I have Clarion 5.5 and I'm using ODBC to open Access database. I need to delete .mdb file after I read data from it, but I can't because file is opened until I exit aplication. I tried close this file using Close(filename.mdb), but nothing changed. Is there any solution for this problem? After your last CLOSE(filename), put this code: filename{PROP:Disconnect} You can use any "filename" that was previously opened. You need to do this only once - no need to do it for all tables that you had opened. This is in the documentation and help file, under "Databas...

print a pdf file from within a MS Access report
Hi. I have a need to create a PDF file from within an MS Access report (within the Access VB code). I am trying to use the Adobe6 Professional tools to do this... but not sure how. I am getting a filename prompt when I use this, but I actually just want to pass it a file name. Does anyone know how to do this? Alternatively, I can currently created a .rtf file from within Access. Perhaps there is a command line tool (or API) that I can call from within Access VB code that will do something like this.... mygreatepdfapp.exe -ic:\myreport1.rtf -oc:\myreport1.pdf ....this would result in t...

How to close an open excel using MS Access VBA
Hi, I have an open excel spreadsheet: C:\Excel Files\Entries.xls What is the vba code that would close this file? Thanks, Barry On 25/01/2015 00:23:19, Barry Wright wrote: > Hi, > > I have an open excel spreadsheet: C:\Excel Files\Entries.xls > > What is the vba code that would close this file? > > Thanks, > Barry > Try Dim MyXL As Object This bit opens the Excel application Set MyXL = CreateObject("Excel.Application") MyXL.Application.Visible = True Workbooks.Add This bit closes it ...

How to import a tab delimited text file into MS Access database
Hi, I have the following task to be done in VC++ 6.0. I have a tab delimited text file that needs to be imported into a MS Access table. The table is created and the table structure is defined using DAO methods. So now I have to fill this table with the data in the text files. For a few rows in the text file, the number of columns could be less than the number of columns in the table. Can anyone please post me the code to do this. Thanks a ton in advance. Pradeep wrote: > I have the following task to be done in VC++ 6.0. We'd be happy to give you the VBA code, but do you really want ...

MS Access Database File Size smaller then previous version
I am novice to MS Access Development, I regularly back my access database every 2, 3 days ...today when I was going to back my database I saw the access file on the network drive was only 9 MB in size, while the backup files that I had saved few days back were 258 MB in size. And the network drive is where the database is saved on. Can anyone suggest something why or how I can track what happend or a way to compare the backup database with the new database to see where they differ.. how to compare table size or forms size in the 2 database, anyone aware of any bugs that could cuz a ...

how to access data iin a MS Excel file using database components?
Can we read data in columns from an MS Excel file? It is possible to use the usual database components in the Delphi palete to read data in an excel file? but how? ...

Using xtopdf and pypyodbc to publish MS Access database data to PDF
Wrote a program that lets you publish your MS Access database data to PDF, = using Python, ReportLab, xtopdf (my toolkit) and pypyodbc. Sharing it here. Link: http://jugad2.blogspot.in/2013/04/using-xtopdf-and-pypyodbc-to-publish-ms.h= tml Note: Saw some comments about my blog post on the Python Reddit, which made= me realize that I had not explained that similar code can be used to publi= sh data from any ODBC database (for which you have an ODBC driver, and whic= h is supported by pypyodbc), to PDF. All you have to do is change the conne= ction string in the code, and ma...

pdf is bigger in size when converted from VBA ms-word than .DOC file
HELLO Everybody ! I am using Acrobat 4.0.1 and I am converting the MS-WORD doc file into ..PDF file by VBA. The code works but my problem is when I tried to check the size of the converted .PDF file it is 138 kb whereas when I saved the same document by .DOC file it is only 19 kb . How come the PDF file is more bigger in size than .DOC file , isn't supposed the PDF file should be much lesser in size than the .DOC FILE? Then I tried to convert the current document manually to PDF file and then I check the converted .PDF file it is only 10kb at least smaller than saved .DOC file if done ma...

Web resources about - Closing a PDF file from VBA - comp.databases.ms-access

2006 Commonwealth Games closing ceremony - Wikipedia, the free encyclopedia
... guitar (equipped with pyrotechnics which produced sparks) whilst being lowered onto the stadium ground, giving a rock concert feel to the closing ...

Facebook Is Not Closing For Maintenance Feb. 29 To 31: Care To Guess Why?
Facebook users, repeat after us: “30 days hath September, April, June, and November. All the rest have 31, excepting February alone, and that ...

We Are All 'Closing Time': Why Semisonic's 1998 Hit Still Resonates
At some point, it was decided that in order for a song to be great, it has to &ldquo;stand the test of time.&rdquo; This has since become a ...

Deadline for Closing of Facebook’s WhatsApp Acquisition Pushed Back by One Year
... to certain adjustments such that the cash paid will comprise at least 25 percent of the aggregate transaction consideration. After closing, ...

CNBC's Closing Bell (@CNBCClosingBell) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Closing time: The 7 Immutable Laws of Sales Negotiation
A group for sales and strategic account negotiation experts stop the carousel Announcement from Closing time: The 7 Immutable Laws of Sales Negotiation ...

Blockbuster store closing sale - Flickr - Photo Sharing!
Explore The Consumerist's photos on Flickr. The Consumerist has uploaded 2057 photos to Flickr.

The Long Day Closes (1992) Closing Sequence - YouTube
The closing sequence from Terence Davies' autobiographical film, The Long Day Closes (1992). Davies' recreates his lonely gay adolescence with ...

Closing bell, January 28 - Business Insider Deutschland
Stocks rallied on Thursday ahead of the big fourth quarter GDP report expected out on Friday morning.

Zuckerberg's wealth closing in on Bezos
Mark Zuckerberg is in position to overtake Jeff Bezos as the world's fifth richest person.

Resources last updated: 2/3/2016 5:57:52 PM