Click here to Skip to main content
11,708,312 members (73,086 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# WPF VS2010 Word
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 20:50pm
Edited 6-Apr-11 21: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 at 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 at 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
0 Maciej Los 245
1 Sergey Alexandrovich Kryukov 189
2 Mika Wendelius 180
3 Peter Leow 130
4 OriginalGriff 103
0 OriginalGriff 9,253
1 Sergey Alexandrovich Kryukov 8,562
2 CPallini 5,189
3 Maciej Los 4,966
4 Mika Wendelius 3,856

Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 7 Apr 2011
Copyright © CodeProject, 1999-2015
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