Access 03 - Output to PDF

JohnPapa

Registered User.
Local time
Today, 09:57
Joined
Aug 15, 2010
Messages
1,141
I use Access 03 and I send reports as email attachments using the following format.

DoCmd.SendObject acSendReport, "ReportName", acFormatSNP

I may need to be able to send the same report in pdf format. I know this is possible with Access 07+.

Is there any way using Access 03 to send the report in pdf format?

Thanks,
John
 
Paul,

I came across the DLL you mention, but decided against it because I did not want to introduce a DLL in my release.

Is there any other way that involves visible code?

Is the introduction of the specific DLL cause any problems?

Thanks,
John
 
I never had any problems with that method, other than having to place the specified files on the user PC. I believe you can also print to a PDF printer. Google "print to PDF" for a number of options. That would still mean having to do something on the user's PC.
 
John

I'm afraid it's the dll method described or upgrade to version 2010. The 2010 built in version creates the PDF's alot quicker than the other method, but both work consistently well.
 
John

I'm afraid it's the dll method described or upgrade to version 2010. The 2010 built in version creates the PDF's alot quicker than the other method, but both work consistently well.

Well, printing to a PDF driver is a viable alternative that many people use, and built-in PDF capability came in wth 2007, not 2010.
 
Hi John.

Can you please explain what you mean by “introduce a DLL in my release”?

Regards,
Chris.
 
Well, printing to a PDF driver is a viable alternative that many people use, and built-in PDF capability came in wth 2007, not 2010.

I think the OP was asking to send via email using VBA. The print drivers I've tried won't allow you to programically save the file in a location of your choice (you may know better) therefore I discounted this option. PDF came in in 2007 but if you were going to upgrade now surely it would be better to upgrade to 2010 rather than 2007.
 
I would go with what Paul said, use PrimoPDF or some other freeware pdf printer drivers, just set that as the default printer and then you do not need to include code or dll's

for info, PrimoPDF will ask you every time where you want it saved
 
John.Woody.

Yes I’m quite familiar with that code. I want to know what JohnPapa sees as a problem. The two DLL’s can be held internally in the FE and dumped to its directory in less than 30 milliseconds and it only needs doing once. No modification of the code by Stephen Lebans is required.

Code:
Public Sub DumpFilesToPath()
    Dim intFileNum     As Integer
    Dim bytBuffer()    As Byte
    Dim strPathAndFile As String

    With CurrentDb.OpenRecordset("tblUserFiles")
        Do Until .EOF
            strPathAndFile = CurrentProject.Path & "\" & !FileName
            
            If Dir(strPathAndFile) <> !FileName Then
                intFileNum = FreeFile
                
                Open strPathAndFile For Binary As intFileNum
                  
                ReDim bytBuffer(!File.FieldSize)
                bytBuffer = !File.GetChunk(0, !File.FieldSize)
            
                Put intFileNum, , bytBuffer()
                
                Close intFileNum
            End If
           
            .MoveNext
        Loop
    End With
    
End Sub

Chris.
 

Users who are viewing this thread

Back
Top Bottom