JLSEsq Posted November 8, 2005 Posted November 8, 2005 Hello all: I'm trying to create a general procedure for printing files, and have run into a snag. The procedure (see below) is intended to print a file using the Process class and ShellExecute, but I don't know all of the Arguments for the PrintTo Verb. I need to know if one of the Arguments can specify the number of copies to print (I hope). Anyone got an answer? Public Sub Print_File(ByVal FilePath As String, ByVal Printer_Name As String, ByVal Num_Copies As Integer) Dim Prt_Proc As New Process Prt_Proc.StartInfo.FileName = FilePath Prt_Proc.StartInfo.Verb = "PrintTo" Prt_Proc.StartInfo.CreateNoWindow = True Prt_Proc.StartInfo.Arguments = """" & Printer_Name & """" Prt_Proc.StartInfo.UseShellExecute = True Prt_Proc.Start() Prt_Proc.WaitForExit() Prt_Proc.Dispose() End Sub Thanks, Jonathan Quote
Administrators PlausiblyDamp Posted November 8, 2005 Administrators Posted November 8, 2005 It really depends on what is defined as the handler for the printto verb, you can check this via explorer by going into the Tools -> Options -> File Types tab and looking at the advanced properties. Be aware this will allow you to see how many parameters can be passed but won't tell you what they are - either google the appname or check any documentation that came with the application. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.