Thanks, Tom!
Yep, that has handled it for me.
I needed this API declare:
Private 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
-And in my routine, this call printed the file:
Dim lRet as long
lRet = ShellExecute(0, "print", "c:\(path to file)\(filename.pdf)", _
"", "", 1)
If lRet is 2, it apparently means file not found. I got the value of
31 when I had the parameters in the wrong positions. 32 and more means
success.
I think it's likely that it used adobe to print this on my machine,
since I also have that installed. I believe it looks at the default
app for pdf extension to decide what to do for "print".
This will also print .doc and .txt files. It brings up a separate
temporary window for each of those, but I believe that can be controled
with the last parameter to the call.
"Print" is not a command that can be run first from the dos prompt to
test, that doesn't appear to make sense. My poor understanding of what
apis actually are had me trying that for a small while.
Thanks heaps, I'm in business.
-Ann