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
Solved

Office 2003 Primary Interop Assemblies Save As Filtered Html Problem!

Posted on 2006-07-09
1
384 Views
Last Modified: 2008-03-10
The problem is as follows:

I am using the office 2003 primary interop assemblies to accept a word file that is uploaded to my website and save that word file into html.

To do so, I use the following code:

      object missing = System.Reflection.Missing.Value;
                  object fileName = strFileName;
            object Format = (int)Word.WdSaveFormat.wdFormatFilteredHTML;
                  oDoc.SaveAs(ref fileName, ref Format,ref missing, ref missing,ref missing,ref missing,ref missing,
                        ref missing,ref missing,ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);

This works great accept when the word document has special office formatting in it. When special formatting exists, a window is popped up on the server by the interop assemblies that says:

"Are you sure you wish to save in this format?" with a yes no prompt.

Thus, how do I stop this menu from popping up and ruining the saving as html process. Preferably I would like to disable this option in Microsoft Word itself but a programming solution would be good also.
0
Comment
Question by:simsingh
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17070246
Maybe this will help:

_app.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone;

Bob
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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