Vijay Panchal

hi

I want to open , modify and save a microsoft document file directly on server (on IIS on my machine). Is it possible with VSTO 2005 with asp.net If yes then how. Pls help me.

Thank in advance

Vijay panchal




Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

Cindy Meister

Hi Vijay

VSTO isn't targeted at the scenario you describe, no.

The better approach would be to compose the document in WordProcessingML, in the Office 2007 Open XML file format. Microsoft has released a Compatibility Pack that will allow all versions of Word back through 2000 to open and edit such a document. A good resource for working with Open XML is the OpenXMLDeveloper.org site.






Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

KRichard

Cindy -

Are you saying that there's no way to programmatically open and save an Office document as XML using VSTO I have a similar question.

Thanks.

- Kevin





Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

Cindy Meister

Hi Kevin

You can do this as part of a VSTO project - the automation interface would certainly allow it. I'm just having some difficulty envisioning the scenario for a VSTO document-level customization...

Keep in mind, the original question is asking about doing this on a server, using ASP.NET. And that is not a scenario VSTO targets or supports.






Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

Chris947

Hi Vijay,

i have similar need,

have you foud a great solution to manipulate ms doc content on DOTNET load, alter and save without MSWORD install

thanks for your help

Christian





Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

KRichard

Cindy -

Thanks for your response. I would like to be able to programatically read a MS Office document, extract the data in XML and process that with XSLT without direct human intervention, whether on a server or client machine. Given the accessibility of the OpenXML format, I suspect that this scenario will be common. I'll admit that I have much to learn about the MS APIs but I did notice the Interop package interface and it looks like it has methods for saving documents in XML. I also have used the OFC.exe utility, which does most of what I need but I still need more control.

Thanks again for your time.

- Kevin





Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

Cindy Meister

Yes, this is a frequent request. But off-topic in this forum, which is dedicated to the VSTO technology. More information on working with the openXML file formats can be found at openxmldeveloper.org

Yes, the user can save documents in XML format; in Office 2007 this is the default. Word 2002 and 2003 can save to these formats, as well, if the Compatibility pack has been installed on that machine. See the "Please Read First" message at the top of this forum for places to ask non-VSTO, Office automation and object model questions.






Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

Chris947

Hi Cindy,

shame on me for my poor previous explanation. Yes, the openXML format work fine. but for the moment, i have many version of doc files (Word2000, 2003 and 2007) on the same server. My job is to serve in aspnet this word document. It's simple but (there is always a but ;-)) i must replace some words with others (<firm> in "Microsoft") before render asp word binary response.

I cannot install office or word on server. I can install dotnet assembly in gac.

I need the, open every word doc source, replace some tag, and render it.

In your opinion, possible or not

fine to read you and : thanks for your quick previous answer....! :-)

(i promise you it's my last message in this forum on this subject)

Chris





Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

Cindy Meister

Chris947 wrote:

Yes, the openXML format work fine. but for the moment, i have many version of doc files (Word2000, 2003 and 2007) on the same server. My job is to serve in aspnet this word document. It's simple but (there is always a but ;-)) i must replace some words with others (<firm> in "Microsoft") before render asp word binary response.

I cannot install office or word on server. I can install dotnet assembly in gac.

I need the, open every word doc source, replace some tag, and render it.

In your opinion, possible or not

fine to read you and : thanks for your quick previous answer....! :-)

(i promise you it's my last message in this forum on this subject)

If the documents are present in binary file format, you have a problem. Before Word 2003 (four or five years ago, that is) it was possible to request the binary file format from Microsoft and use C++ to access the files directly. But Microsoft have withdrawn this information. Given your requirements, I think you'll need to set up a "conversion system" on a local machine that opens these documents and saves them back to a file format you can read with your ASP.NET program. That could be RTF, or Word's round-trip HTML, or the Word 2007 OpenXML file format. Of course, while the documents are open, you might as well replace the terms...






Re: Visual Studio Tools for Office How can i use VSTO 2005 to open, modify ans save a word document directly on server(IIs on local machin) in asp.net application?

jinishans

Hi

We're in the poc phase for a word reporting project. We've tried creating the schema/templates in Word 2003 and saving the schema (Generate XSD), Save the same document data as XML by selecting 'Save data only as XML' and using Wml2Xslt.exe provided by M$ (Word ML to XSLT) to generate XSLT and use this XSLT and XML to generate WordML documents.

But, we want to save this WordML to pre Word 2003 (Word 2000) document, Word 2003 .doc files and store it. For this activity we're planning to use VSTO 2005 in server to use the 'save as' feature thru Web Service.

Throw some light on whether the 2nd activity (converting WordML to Word '.doc' file) in server will work as a Web Service.

Regards
JiniShans