PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

create pdf programatically

 
 
Tony
Guest
Posts: n/a
 
      2nd Mar 2009
I am using Access 2007. I want to add new menu item so that when clicked pdf
file will be automatically created and stored in particular location, i.e.
result.pdf to be stored in c:\temp directory. I know that it could be done by
opening report, clicking on print and selecting pdf printer but I would like
to make it working invisible for user. After clicking user will just received
message advising that the pdf file was created and is ready for collection.
Can this be done ? How ?

Thanks for help.
 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      2nd Mar 2009
Firstly, make sure you have the PDF add-in from Microsoft for A2007:
http://www.microsoft.com/downloads/d...displaylang=en

You can then code like this:
strDoc = "Report1"
strFile = "C:\temp\result.pdf"
DoCmd.OutputTo acOutputReport, strDoc, acFormatPDF, strFile, True
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tony" <(E-Mail Removed)> wrote in message
news:4F225905-C518-4C62-A052-(E-Mail Removed)...
>I am using Access 2007. I want to add new menu item so that when clicked
>pdf
> file will be automatically created and stored in particular location, i.e.
> result.pdf to be stored in c:\temp directory. I know that it could be done
> by
> opening report, clicking on print and selecting pdf printer but I would
> like
> to make it working invisible for user. After clicking user will just
> received
> message advising that the pdf file was created and is ready for
> collection.
> Can this be done ? How ?
>
> Thanks for help.


 
Reply With Quote
 
MPG
Guest
Posts: n/a
 
      15th Jul 2009
Is there a way to print multiple reports to one pdf file?

"Allen Browne" wrote:

> Firstly, make sure you have the PDF add-in from Microsoft for A2007:
> http://www.microsoft.com/downloads/d...displaylang=en
>
> You can then code like this:
> strDoc = "Report1"
> strFile = "C:\temp\result.pdf"
> DoCmd.OutputTo acOutputReport, strDoc, acFormatPDF, strFile, True
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Tony" <(E-Mail Removed)> wrote in message
> news:4F225905-C518-4C62-A052-(E-Mail Removed)...
> >I am using Access 2007. I want to add new menu item so that when clicked
> >pdf
> > file will be automatically created and stored in particular location, i.e.
> > result.pdf to be stored in c:\temp directory. I know that it could be done
> > by
> > opening report, clicking on print and selecting pdf printer but I would
> > like
> > to make it working invisible for user. After clicking user will just
> > received
> > message advising that the pdf file was created and is ready for
> > collection.
> > Can this be done ? How ?
> >
> > Thanks for help.

>
>

 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      16th Jul 2009
Hi,
you can use this function to merge 2 PDF documents, so at the end you will
get one PDF from several:

Private Declare Function MergePDFDocuments Lib "StrStorage.dll" (ByVal
PDFMaster As String, ByVal PDFChild As String) As Long

from StrStorage.dll, which you can get here:
http://www.lebans.com/reporttopdf.htm

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com


"MPG" <(E-Mail Removed)> wrote in message
news:FBDC1D14-E4FA-48DC-B142-(E-Mail Removed)...
> Is there a way to print multiple reports to one pdf file?
>
> "Allen Browne" wrote:
>
>> Firstly, make sure you have the PDF add-in from Microsoft for A2007:
>> http://www.microsoft.com/downloads/d...displaylang=en
>>
>> You can then code like this:
>> strDoc = "Report1"
>> strFile = "C:\temp\result.pdf"
>> DoCmd.OutputTo acOutputReport, strDoc, acFormatPDF, strFile, True
>> --
>> Allen Browne - Microsoft MVP. Perth, Western Australia
>> Tips for Access users - http://allenbrowne.com/tips.html
>> Reply to group, rather than allenbrowne at mvps dot org.
>>
>> "Tony" <(E-Mail Removed)> wrote in message
>> news:4F225905-C518-4C62-A052-(E-Mail Removed)...
>> >I am using Access 2007. I want to add new menu item so that when clicked
>> >pdf
>> > file will be automatically created and stored in particular location,
>> > i.e.
>> > result.pdf to be stored in c:\temp directory. I know that it could be
>> > done
>> > by
>> > opening report, clicking on print and selecting pdf printer but I would
>> > like
>> > to make it working invisible for user. After clicking user will just
>> > received
>> > message advising that the pdf file was created and is ready for
>> > collection.
>> > Can this be done ? How ?
>> >
>> > Thanks for help.

>>
>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programatically Create Primary Key =?Utf-8?B?TWVsaXNzYQ==?= Microsoft Access 7 16th Jan 2006 05:31 AM
Create ASP.Net Page Programatically Mythran Microsoft VB .NET 6 9th Mar 2005 04:46 PM
Create MDE programatically GeorgeMar Microsoft Access VBA Modules 6 1st Jun 2004 08:00 PM
Create a new account programatically: is possible? keysman Microsoft Outlook VBA Programming 1 27th Apr 2004 03:49 PM
Create a new account programatically: is possible? keysman Microsoft Outlook VBA Programming 0 26th Apr 2004 11:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:16 AM.