Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6753881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:12:53+00:00 2026-05-26T13:12:53+00:00

I have a code where i am printing word document. In the sample document

  • 0

I have a code where i am printing word document.
In the sample document there is a section with picure that has modified margins by user.

When i execute the code I recieve following message:

The margin of section 1 are set outside of printable area.

After processing document, it starts spooling and throws this promt
enter image description here
How do i turn the notification dialog box off?

my code so far:

        Process printJob = new Process();
        printJob.StartInfo.Verb = "PrintTo";
        printJob.StartInfo.Arguments = printerName;
        printJob.StartInfo.ErrorDialog = false;
        printJob.StartInfo.CreateNoWindow = true;
        printJob.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
        printJob.StartInfo.FileName = path;
        printJob.StartInfo.UseShellExecute = true;
        printJob.StartInfo.Verb = "print";
        printJob.Start();

Where variable path > is file name path

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:12:53+00:00Added an answer on May 26, 2026 at 1:12 pm

    http://word.mvps.org/faqs/macrosvba/OutsidePrintableArea.htm

    According to this, you’ll need to turn off background printing, then turn off Application.DisplayAlerts.

    EDIT

    You’re not going to be able to do this with Process. The “print” verb uses /x /dde to tell Word to print:

    /x Starts a new instance of Word from the operating shell (for example, to print in Word). This instance of Word responds to only one DDE request and ignores all other DDE requests and multi-instances. If you are starting a new instance of Word in the operating environment (for example, in Windows), it is recommended that you use the /w switch, which starts a fully functioning instance.

    To suppress the message, you’re going to need to do interop instead:

    1. Add a reference to Microsoft.Office.Interop.Word
    2. Make a Print(string path) method:
    Application wordApp = new Application();
    wordApp.Visible = false;
    
    //object missing = Type.Missing;
    
    wordApp.Documents.Open(path); //for VS 2008 and earlier - just give missing for all the args
    
    wordApp.DisplayAlerts = WdAlertLevel.wdAlertsNone;
    wordApp.ActiveDocument.PrintOut(false); //as before - missing for remaining args, if using VS 2008 and earlier
    
    wordApp.Quit(WdSaveOptions.wdDoNotSaveChanges); //ditto
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a code where i am printing word document. I have decided on
I have code written that converts my Document to a string prior to printing
We have an Oracle BPM 10g activity that: Reads a form-fill protected Word document
I have some VSTO code which generates a Word 2003 document by copying and
I have some code that is used to programmatically create a Document to send
I have the following code: using System; using System.Diagnostics; using System.IO; using PdfSharp.Pdf.Printing; namespace
I have code that references a web service, and I'd like the address of
I have code that looks like the following, which works fine for displaying the
i have code like this. which is actually a form .which lets user updates
We have C# code in a PowerPoint Addin for custom printing. In Office 2003,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.