A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Office » General Discussions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to close a *.PDF report in VBA



 
 
Thread Tools Display Modes
  #1  
Old December 15th, 2009, 07:59 PM posted to microsoft.public.office.misc
FSHOTT[_2_]
external usenet poster
 
Posts: 58
Default How to close a *.PDF report in VBA

I am working on an application which is to send ACCESS reports to suppliers
(Monthly Supplier Performance Report cards). I am using the VBA code from the
references which I was directed to, from this forum. I use the Stephan Labans
code to convert the ACCESS report to a PDF format. I send a MS Outlook
message with 2 attachments (a snapshot {snp} and PDF version of the report).
Currently the code works if I close the open PDF version of the report before
the code increments to the next supplier (next recordset record). If I do not
manually close the displayed PDF file I get an error message (permission
denied) when I try to execute the Kill (“C:\SupplierReportCard.PDF”) and loop
to the next supplier. I am thinking I need to close the open PDF file after
sending the Email and before looping to the next supplier in the recordset. I
currently do not know how to do this. I use a DoCmd.Close acReport to close
the ACCESS version of the report but this does nothing for the PDF version.
So my question is, is my assumption correct that I need to close the report
before looping and if so how do I do this?
--
frank-a
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.