Print page to single page Files



I'm using this Code which I think I got from the Dev Ashish site but don't
It prints everything ok but I need to break up the Pages to single files
each and save them for later invoice attachments.

Any Thoughts on how to do it?

Public Sub PrintThisFile(FileName As String)
Dim X As Long
X = ShellExecute(hWndAccessApp, "Print", FileName, vbNullString, 0&,
End Sub

Here is the General Module Code:
Public Const SW_SHOWNORMAL = 1
Public Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long


Just wanted to be sure I was understood that this is a PDF file, I do not
want to actually print the multi-page PDF to a printer, just print each page
to a PDF file.

Sort of a code loop to print each page back to PDF combined with a Save As
to convert 1 multi-page PDF to many single page PDF's by code.

I have not used API calls before and do not know what kind of request I can
pass to it. Such as Page # to print. I know it closes the Doc after printing
it, so there must be some other commands as well, but I have no helps files
in Access to tell me.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question