Solved

Popup window while printing

Posted on 2004-08-07
7
537 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
Suggested Courses

627 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