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
Tripat Bala Singh
1.1k
633
164.5k
How to save compare report of two word document in root.
Feb 1 2016 1:01 AM
How to save compare report of two word document in project root
try
{
object missing = System.Reflection.Missing.Value;
string apppath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);//
apppath = apppath.Remove(apppath.Length - 10);
object fileToOpen = @"" + apppath + "\\DocFile\\RefDoc.doc";
string file = @"" + apppath + "\\DocFile\\TypedDoc.doc";
string roport = @"" + apppath + "\\DocFile\\Report.doc";
Microsoft.Office.Interop.Word.Application WA = new Microsoft.Office.Interop.Word.Application();
Document wordDoc = null;
wordDoc = WA.Documents.Open(ref fileToOpen, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
//object compareTarget = Microsoft.Office.Interop.Word.WdCompareTarget.wdCompareTargetNew;
wordDoc.Compare(file, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
//wordDoc.Close(ref missing, ref missing, ref missing);
//WA.Quit(ref missing, ref missing, ref missing);
MessageBox.Show("Compaire Sucessfull");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
i want to save two word document compare report in my root through C# programming
Attachment:
code.zip
Reply
Answers (
1
)
c# using data table
convertion