468,539 Members | 1,693 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,539 developers. It's quick & easy.

Problems printing using system.diagnostics.process

Hi,

I'm using the following code to print documents from the file system but i'm
encountering strange behaviour. If I print one document it works ok but if i
say loop round a list of files and print them they start coming out in the
wrong order, some of the documents are printed multiple times and others are
not printed at all.

I think it might be the invoked application, word, outlook, acrobat etc,
getting in a mess when it has to open and print a lot of documents.
Increasing the waitforexit value doesn't seem to help.

Anyone have any ideas or suggestions?

proc = New System.Diagnostics.Process
proc.StartInfo.FileName = strPath + strFilename
proc.StartInfo.Verb = "print"
proc.StartInfo.CreateNoWindow = True
proc.Start()
While Not proc.HasExited
proc.WaitForExit(10000)
End While
Jul 21 '05 #1
0 1008

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Brett | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.