Re: .NET (C#) and Word Application
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 5 Feb 2008 15:39:35 -0500
Emil,
In addition to what Michael mentioned, the only way to embed a Word
document into .NET is to do it through the WebBrowser control (basically,
save the document to disk and then load it into the web browser).
You do contradict yourself by saying that you want to open the document
in the real Word 2007 application, and then embed it in your program. While
you can embed the document in your program, embedding the application isn't
such a good idea. Also, Office 2007 fundamentally changed the way they
handle their UI, so you can't just expect the menu merges to work completely
when embedding the document in your app.
Your best bet is to create the document XML yourself, and package it
yourself and then use Word 2007 to work with it. You can use the classes in
the System.Xml namespace to generate the actual XML (Office 2007 documents
are really nothing more than XML files packaged in a zip file) and then the
classes in the System.IO.Packaging namespace to package all the components
together.
You will want to search for examples of how to create a document using
XML tools as well, which should be relatively easy to find.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
"Emil" <Emil@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:72DD5027-E612-44C7-9D86-09C23912138D@xxxxxxxxxxxxxxxx
Hi all,
I'm a C++ developer and a very beginner in both C# (.Net) and Word
Programming. What my company wants next is something like this: from
different texts to build a Word 2007 document and then open this in the
real
Word 2007 application to give the user the possibility to change the
document
as usual with all possibilities (Menüs, Panels, etc.). Well my problem is
that the Word 2007 must be embedded in our C# - Application (WinForms).
Knows somebody a solution to do this: embed the Word 2007 application in
WinForms or if better maybe in WPF? For any idea thank you in advance.
Best Regards,
Emil
.
- Prev by Date: Re: Concatenating IEnumerable?
- Next by Date: Re: "Global" exception handling
- Previous by thread: Re: .NET (C#) and Word Application
- Next by thread: Re: Concurrency Nightmare
- Index(es):
Relevant Pages
|