Hi. Thanks to all of you for replying so quickly. I apologize for not responding sooner - I got put off onto another project and did not want to respond until I tried your suggestions. Using SendKeys does work for this, and I am able to bypass the print dialog and put my files to the name I want.
However, I also have another problem.
Before the print dialog comes up, a warning message is displayed:
WARNING! A script has requested to print an acrobat file. This could print an entire document. Do you want to proceed printing?
I found information which suggested that this could be suppressed by executing the following code
Dim AdobeVersion AsDecimal
Dim FilePath AsString = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe", "", "")
If IO.File.Exists(FilePath) Then
AdobeVersion = FileVersionInfo.GetVersionInfo(FilePath).FileMajorPart
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\"& AdobeVersion.ToString("N1") & "\AVAlert\cCheckbox\cAcrobat\", "iWarnScriptPrintAll", "1", Microsoft.Win32.RegistryValueKind.DWord)
EndIf
I execute this code before doing my PrintAll statement, and I can see that the code is executed without an error, but I still get the warning. My version of Adobe Reader is 11.0 and I am running under Windows 7.
Any suggestions? I did try sending an Enter key to try to deal with this message as well but my application hung.