Click here to Skip to main content
12,078,795 members (54,254 online)
Rate this:
Please Sign up or sign in to vote.
Hi friends. I am creating an application which allows a user to open word within an C# application with WPF. Can you please help me with the code to open a word application within a group box. Thanks in advance.
Posted 6-Apr-11 21:50pm
Edited 6-Apr-11 22:23pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Here is a way to open a word document :

Add a COM reference : Microsoft Office 12.0 Object Library

Then add the following namespace :

using Microsoft.Office;
using office = Microsoft.Office.Interop.Word;

And then in the code where you want to use, add this :

var wordApp = new office.Application();
Document document=wordApp.Documents.Open(//Specify the parameters)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I would simplify the problem by creating new Process.
Opening word application within a group box is not a trivial task.
aditya behara 7-Apr-11 5:12am
Can you elaborate this topic? I am creating a WPF application. I an using tab control in my application. And under a particular tab there is group box where I want to display the word application. Can you please upload the code that will be more explanatory.
Ciumac Sergiu 7-Apr-11 5:48am
Process.Start will start Microsoft Word as a separate application. If you like to embed the Word app into your WPF you would rather want to consult P/Invoke topic proposed by Tarun.K.S.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

A good start is here Office Development in Visual Studio[^]

Perhaps here you can find what you need.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.160212.1 | Last Updated 7 Apr 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100