none
Prevent Word.Application.Document object from sendig Pop Ups RRS feed

  • Question

  • We are using the method export_to_fixed_format to convert Word documents to pdf. The conversion is done in server mode, i.e. without user interaction. For some documents Word throws strange pop ups asking for a document version oder a document state. Theses pop ups, of course, are stopping the conversion server, since no user interaction is available. I couldn't find out the reason for the pop ups.

    Now the question: Is there any possibility to prevent, that the COM-object is sending UI-relevant information. As far as I understood, an automation server shouldn't send any UIs, instead it should send exceptions. Then the client can react correspondingly.  

    Thank you.

    Thomas

    Monday, November 19, 2012 3:20 PM

Answers

  • Hi Tom,

    Thanks for posting in the MSDN Forum.

    Based on http://support.microsoft.com/kb/257757, I would not recommend you use Word Object Model to approach your goal. I think there must exists some 3rd part software can do that.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, November 20, 2012 6:16 AM
    Moderator
  • Hi Thomas

    Are you using Word Automation Services,  or have you just installed Word on a server?

    If the latter, Word wasn't designed to be used in this manner - it isn't an "automation server", it's an end-user product, as the KB article to which Tom Xu points you explains.

    There is a product Word Automation Services that runs on SharePoint. I don't know, however, whether it provides the same functionality as exportToFixedFormat. http://msdn.microsoft.com/en-us/library/ee558830(office.14).aspx

    The other alternative to using a third-party tool would be to develop your own converter that "transforms" the Word document ZIP package of XML files to PDF.


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, November 20, 2012 8:03 AM
    Moderator
  • Hi Milonass

    The COM objects aren't useless - they simply were not designed to be used in the manner in which you'd like to use them. The Office object models (I believe that's what you mean when you use the term "COM objects") were designed to allow the developer to interact with the end-user application in order to 1) extend the built-in functionality and 2) automate repetitive processes, all within the context of the application.

    The Office COM interfaces were never intended to be used as components in other applications, independent of the end-user's use, which is what you (and many, many others) would like to do. But the licensing targets end-user and not developers...


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, November 22, 2012 2:43 PM
    Moderator

All replies

  • Hi Tom,

    Thanks for posting in the MSDN Forum.

    Based on http://support.microsoft.com/kb/257757, I would not recommend you use Word Object Model to approach your goal. I think there must exists some 3rd part software can do that.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, November 20, 2012 6:16 AM
    Moderator
  • Hi Thomas

    Are you using Word Automation Services,  or have you just installed Word on a server?

    If the latter, Word wasn't designed to be used in this manner - it isn't an "automation server", it's an end-user product, as the KB article to which Tom Xu points you explains.

    There is a product Word Automation Services that runs on SharePoint. I don't know, however, whether it provides the same functionality as exportToFixedFormat. http://msdn.microsoft.com/en-us/library/ee558830(office.14).aspx

    The other alternative to using a third-party tool would be to develop your own converter that "transforms" the Word document ZIP package of XML files to PDF.


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, November 20, 2012 8:03 AM
    Moderator
  • Thank you for your reply. To be honest: I don't understand why microsoft creates that COM-objects. I tried to use the outlook view control in my application. The context menu didn't work without starting the outlook application. The application crashed. Then I found a note from microsoft, that the control can only be used in Add-Ins. But why should I use the control in an Add-In where I have the control anyway? Now the same with the Word COM-Object. I assume Excel and PPT behaves in the same manner. The conclusion is: These COM-objects are useless.

    Thursday, November 22, 2012 11:30 AM
  • Hi Milonass

    The COM objects aren't useless - they simply were not designed to be used in the manner in which you'd like to use them. The Office object models (I believe that's what you mean when you use the term "COM objects") were designed to allow the developer to interact with the end-user application in order to 1) extend the built-in functionality and 2) automate repetitive processes, all within the context of the application.

    The Office COM interfaces were never intended to be used as components in other applications, independent of the end-user's use, which is what you (and many, many others) would like to do. But the licensing targets end-user and not developers...


    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, November 22, 2012 2:43 PM
    Moderator