We have been printing pdf files through Adobe, from Access for
several years. Adobe version 5.0 is currently installed. Recently we
have received PDF files that were created under the Adobe 7.0 version.
When trying to view a file manually Adobe 5.0 displays a pop up
message:
"This file may contain newer information than this viewer can
support. It may not open or display correctly". There is a check
box with the pop-up that says, "Do not show this message again" but
it only lasts for the current instantiation of Adobe. If Adobe closes,
that flag is lost.
When printing a list of file with VBA, the earlier version PDFs
print but the newer versions do not. There is no pop-up so the
situation is not obvious to the user.
To sum that up, the pdf files could be printed manually, but when
printing from VBA a list of files that are intermixed 5.0 and 7.0, the
7.0 files do not print.
I use the following call:
ShellExecute Calling.hwnd, "print", PathName, "", 0, SW_SHOWNORMAL
This is in the Declaration area:
' From Google News Group - How to Hyperlink 08/21/05
Private Declare Function WinAPI_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
Of course, upgrading to Adobe 7.0 would work but there is
resistance from our users to make the change. Is there any switch
setting in the above call, or a way to use the Parameters string to
suppress error messages? I am checking the return value but I get 42
whether it prints or not.
Hank Reed