none
Using Word on server 2003 RRS feed

  • Question

  • I'm creating a vb windows app that will run on windows server 2003 in a clustered environment. I need to basically open a Word document and perform a SaveAs to save the doc as a .txt file to not lose any auto generated numbers or bullets. I will then open the txt file and process it into a database.


    How can I use the word object on this server without installing office? Is it possible to just copy certain dll's over to the .exe path and make it work? We don't really want to buy a 3rd party addin nor am I sure one would do what I need.

     

    Thanks,

    Rut


    Mike Rutledge
    • Moved by Mike Feng Wednesday, September 14, 2011 8:38 AM Word (From:Visual Basic Interop and Upgrade)
    Wednesday, September 14, 2011 12:19 AM

Answers

  • Hi Rut

    Open XML requires absolutely nothing in the way of licensed software or dlls in the Office "space". An Open XML file is a Zip Package of XML files. So you just need to program an app(let) that can work with that combination. If you're "into" .NET, then you can use the standard .NET Framework Packaging and XML namespaces. If you work with Visual Studio .NET then you can leverage the Open XML SDK.

    The Open XML file formats were created expressly for working with Office documents in a server environment :-)

    But please note this does not apply to older documents (*.doc files).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bruce Song Friday, September 23, 2011 2:05 AM
    Wednesday, September 14, 2011 12:53 PM
    Moderator

All replies

  • Hi Mike Rutledge,

    Welcome to the MSDN Forum.

    Generally, there is no way to achieve this goal. The DLLs are protected by microsoft copyright.

    So, if you don't want to buy a office product, you can try the other open source.

    Thank you for your understanding and support.

    Best regards,


    Mike Feng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, September 14, 2011 8:37 AM
  • Hi Mike

    Server-side usage of the Office applications is neither recommended nor supported. And, as Mike Feng says, the Word application would have to be installed on the machine where this is executing.

    You don't mention, however, which version of Word is involved or the file types you'd need to process. Would these be docx or docm files? If yes, you could use Office Open XML to process the file content without requiring the Office application to be installed.

    Another possible approach would be to use Word Automation Services if you have access to Sharepoint Server 2010.


    Cindy Meister, VSTO/Word MVP
    Wednesday, September 14, 2011 10:44 AM
    Moderator
  • Thanks. It isn't that we don't want to buy Word. We have many copies of it. They just don't want to install it on  a clustered server.  As far as the Office Open XML item, would it also have to be installed like Word or can certain dll's be copied?

     

    Thanks,

    Rut


    Mike Rutledge
    Wednesday, September 14, 2011 11:56 AM
  • Hi Rut

    Open XML requires absolutely nothing in the way of licensed software or dlls in the Office "space". An Open XML file is a Zip Package of XML files. So you just need to program an app(let) that can work with that combination. If you're "into" .NET, then you can use the standard .NET Framework Packaging and XML namespaces. If you work with Visual Studio .NET then you can leverage the Open XML SDK.

    The Open XML file formats were created expressly for working with Office documents in a server environment :-)

    But please note this does not apply to older documents (*.doc files).


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bruce Song Friday, September 23, 2011 2:05 AM
    Wednesday, September 14, 2011 12:53 PM
    Moderator
  • Thanks for the reply. Well that sounds great but unfortunately, we need to be able to handle the older .doc files as well. I guess I'll be looking at 3rd party tools.

     

     


    Mike Rutledge
    Wednesday, September 14, 2011 1:03 PM
  • Unless you have access to Sharepoint Server 2010, yes, that's about all you can do.
    Cindy Meister, VSTO/Word MVP
    • Proposed as answer by Bruce Song Wednesday, September 21, 2011 2:01 AM
    Wednesday, September 14, 2011 3:14 PM
    Moderator