Re: .NET (C#) and Word Application



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


.



Relevant Pages

  • Re: master / detail datagrid...
    ... Macromedia uses their prefix in the exact same way an XML ... A patent on the other hand can be obtained but unlike the paltry ... and an XML Namespace is the equivalent of a short musical ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Root Namespace Prefix and OpenXml
    ... XML stream is passed into an Engine ... > - if you want to apply the namespace uri ... > - However if you keep the prefix declaration in your top level element ...
    (microsoft.public.sqlserver.xml)
  • Re: namespace?
    ... Namespaces are used in XML (which is the format that your web service ... an XML namespace should start with the ACTUAL URL of your ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Referencing the xml: namespace in BTS2004
    ... namesace as any other namespace instead of the reserved namespace the W3C ... except for the "lang" attribute qualified to the special xml: ... > able to validate your xsd file and also xml.xsd and you should now be able ... > generated XSD was equivalent to the original DTD. ...
    (microsoft.public.biztalk.general)
  • RE: XmlDocument.SelectSingleNode XPathException
    ... The "xmlns:sns="http://www.test.org/sub"</a>;>" in the xml itself provides the ... > As for using XmlNamespaceManager to help executing XPATH in xmldocument ... > When there is namespace in an xml document to scope elements in different ... > name of an element is actually it's namespaceURI(not prefix) combined with ...
    (microsoft.public.dotnet.xml)