Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 545
  • Last Modified:

Popup window while printing

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
cmatian
Asked:
cmatian
3 Solutions
 
Joanne M. OrzechManager, Document Services CenterCommented:
Try:

Application.DisplayAlerts = False
0
 
fulscherCommented:
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
 
_agj_Commented:
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
 
billyvandergawCommented:
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now