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

  • SEARCH
  • Home
  • 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 8668345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:11:28+00:00 2026-06-12T18:11:28+00:00

I have a Word to PDF Converter written in c# which works fine except

  • 0

I have a Word to PDF Converter written in c# which works fine except of one thing. Sometimes (on some Word Files) there is a Message in Background with Save Changes in Source File -> YES NO CANCEL – but I dont do any changes in Source file. I just wanna create a PDF File from the Word File, without changing anything.

So is there a Possibility to disable this Prompt, or set automatically to “NO”. ?

Here is my Code:

// Create an instance of Word.exe
        Microsoft.Office.Interop.Word._Application oWord = new  Microsoft.Office.Interop.Word.Application();

        // Make this instance of word invisible
        oWord.Visible = false;

        oWord.DisplayAlerts = Microsoft.Office.Interop.Word.WdAlertLevel.wdAlertsNone;

        oWord.Options.SavePropertiesPrompt = false;
        oWord.Options.SaveNormalPrompt = false;

        // Interop requires objects.
        object oMissing = System.Reflection.Missing.Value;
        object isVisible = true;
        object readOnly = true;
        object oInput = input;
        object oOutput = output;
        object oFormat = format;

        // Load a document into our instance of word.exe
        Microsoft.Office.Interop.Word._Document oDoc = oWord.Documents.Open(ref oInput, ref oMissing, ref readOnly, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref isVisible, ref oMissing, ref oMissing, ref oMissing, ref oMissing);

        // Make this document the active document.
        oDoc.Activate();

        // Save this document in Word 2003 format.
        oDoc.SaveAs(ref oOutput, ref oFormat, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);

        // Always close Word.exe.
        oWord.Quit(ref oMissing, ref oMissing, ref oMissing);
  • 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-06-12T18:11:30+00:00Added an answer on June 12, 2026 at 6:11 pm

    Did you try passing false as the first argument to Quit?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently we have thousands of Microsoft Word files, Excel files, PDF's, images etc stored
I have a text document (word or pdf) which has a long list of
I have a request from a client which requires me to process pdf files
I have two files. one is doc and another is pdf. Now, what I
I have some word documents with objects inside them. I am testing one that
I have a word doc with some ActiveX buttons on it. When one of
I have a application which stores documents on the file system (PDF, WORD etc)..
I have webpages that contain links to word documents and pdf files. For each
I have a simple Word to Pdf converter as an MSBuild Task. The task
I have an encrypted word/excel/pdf file locally stored which I need to preview in

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.