Wed Apr 15, 2009 11:06 am
ApplicationClass objWordApp = new ApplicationClass();
Document objWordDoc = new Document();
foreach (string eachfile in lstfile.Items)
{
Object nothing = System.Reflection.Missing.Value;
Object fileName = txtFilename.Text.ToString();
Object notTrue = false;
Object missing = System.Reflection.Missing.Value;
objWordDoc = null;
Object readOnly = false;
Object isVisible = false;
objWordApp.Visible = false;
objWordDoc = objWordApp.Documents.Open(ref fileName, ref
missing,
ref readOnly, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref isVisible, ref missing, ref missing,
ref missing, ref missing);
objWordDoc.Activate();
objWordApp.Visible = false;
string InDoc = OPagPath + "\\" + eachfile;
objWordApp.Selection.InsertFile(PagFpath, ref missing, ref missing, ref
missing, ref missing);
//Here I need help to find and replace with particular style
}
objWordApp.Quit(ref notTrue, ref missing, ref missing);
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.