Click here to Skip to main content
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 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 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 OriginalGriff 520
1 Maciej Los 205
2 Suvendu Shekhar Giri 159
3 Peter Leow 140
4 Kornfeld Eliyahu Peter 133
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 8,895
2 Peter Leow 5,044
3 Kornfeld Eliyahu Peter 3,333
4 Maciej Los 2,561

Advertise | Privacy | Mobile
Web04 | 2.8.150327.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