Solved

Popup window while printing

Posted on 2004-08-07
7
520 Views
Last Modified: 2012-06-27
Hi Experts,

While printing word documents using visual basic and word object, some documents showing a popup window. The message is " The margins of sections of section 1 are set outside the printable area of the page. Do you want to continue". If we press Yes it will print the page and after that the code throws an error while closing the document. We are looking for a solution for this problem.

Thanks in advance.


0
Comment
Question by:cmatian
7 Comments
 
LVL 37

Accepted Solution

by:
Joanne M. Orzech earned 168 total points
ID: 11742512
Try:

Application.DisplayAlerts = False
0
 
LVL 12

Assisted Solution

by:fulscher
fulscher earned 166 total points
ID: 11744713
Or, adjust the page sizes. I've seen this problem often in a mixed US/Europe enviroment (Letter vs. A4). Check all page settings of the document and adjust accordingly. Also, it could be a problem of the printer settings which might not be correctly set. If you set up a new printer, it will set the page format according to some magic algorithm. You might have to adjust the printer page settings (Control panel, printers, select printer and search for ALL page default settings. In Windows 2000 with HP printers, there were actually 2 settings which had to be set manually on each PC).

Hope this helps
Jan
0
 
LVL 7

Expert Comment

by:_agj_
ID: 11780841
set the printer's page size using the Printer object.

try saving the doc as a doc and then manually open and print from word.

u shud get the same errors, but it will giv u info on wat to fix.
0
 
LVL 1

Assisted Solution

by:billyvandergaw
billyvandergaw earned 166 total points
ID: 12102786
Easy solution, fix the margins of your code to co-exist to the ones on universal standards.  This error will happen with almost any application if you put objects outside the margins of a standard printer set.  So just change your code to now go outside the margins of 6 inches in width, cause 1 inch on each side (2 inches sum) are the margins of width.  This should fix it, and the errors should go away.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Like many others, we try and discourage users from printing documents unnecessarily and instead send or share them electronically. However, this doesn't always work and documents are still printed. With this simple solution, if the user tries to …
Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now