elloco999
Well-known member
- Joined
- Dec 21, 2004
- Messages
- 49
- Programming Experience
- 5-10
Hi All,
I have a small windows application that gets word documents from a source folder, prints the documents and moves the documents to a destination folder.
The printing is done using the following code:
This works great when there are no problems with the word documents. Word will open, print the file and close.
But the documents have one problem: the documents are set to A4 paper, with margins set so small word will ask this question: "The margins of section 1 are set outside the printable area of the paper. Do you want to continue?" And the user has to click yes or no.
The reason this application was build is so the documents can be printed without user interaction (there are several thousands of documents), so if the user has to answer this question for each document, it kinda loses it's purpose...
Does anyone have an idea of how to suppress this question? I had hoped that the line
would do the trick, but it doesn't make any difference.
Any help would be greatly appreciated.
Thanks,
Rick
I have a small windows application that gets word documents from a source folder, prints the documents and moves the documents to a destination folder.
The printing is done using the following code:
VB.NET:
Dim printProcess As New Process
printProcess.StartInfo.CreateNoWindow = True
printProcess.StartInfo.Verb = "Print"
printProcess.StartInfo.FileName = filePath
printProcess.Start()
This works great when there are no problems with the word documents. Word will open, print the file and close.
But the documents have one problem: the documents are set to A4 paper, with margins set so small word will ask this question: "The margins of section 1 are set outside the printable area of the paper. Do you want to continue?" And the user has to click yes or no.
The reason this application was build is so the documents can be printed without user interaction (there are several thousands of documents), so if the user has to answer this question for each document, it kinda loses it's purpose...
Does anyone have an idea of how to suppress this question? I had hoped that the line
VB.NET:
printProcess.StartInfo.CreateNoWindow = True
Any help would be greatly appreciated.
Thanks,
Rick