TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Danasegarane Arunachalam
NA
1
0
Select All in Winword
Oct 17 2007 7:49 AM
Hi all, I am using this code, to open a word document using Latebinding.Can any one help to copy the contents of the opened document to clipboard. [code] private void button2_Click(object sender, EventArgs e) { object WordApp; object WordDoc; object Doc; ArrayList nFile=new ArrayList(); Object[] objFalse = new Object[1]; objFalse[0] = true; object[] nfilename=new object[1]; nfilename[0]= @"c:\abe.DOC"; Type objClassType = Type.GetTypeFromProgID("Word.Application"); WordApp = Activator.CreateInstance(objClassType); objClassType.InvokeMember("Visible", System.Reflection.BindingFlags.SetProperty, null, WordApp, objFalse); WordDoc = WordApp.GetType().InvokeMember("Documents",System.Reflection.BindingFlags.GetProperty, null, WordApp, null); Doc = WordDoc.GetType().InvokeMember("Open", System.Reflection.BindingFlags.InvokeMethod, null, WordDoc, nfilename); Object WordView = WordApp.GetType().InvokeMember("Quit", System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public, null, WordApp, null); } [/code]
Reply
Answers (
0
)
What does Impersonation mean in .NET
Dynamic Combo Box problem