Hi,
i am converting html document into plain text using the below funcion
private void TextFileConvertion(string strsource, string strtarget)
{
object Unknown = Type.Missing;
Word.Application newApp = new Word.Application();
newApp.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone;
try
{
lblProgress.Text = "Converting " + strsource + " into Text file is under process.";
Application.DoEvents();
object Source = strsource;
object Target = strtarget;
newApp.Documents.Open(ref Source, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown, ref Unknown, ref Unknown);
object format = Word.WdSaveFormat.wdFormatText;
newApp.ActiveDocument.SaveAs(ref Target, ref format,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown, ref Unknown,
ref Unknown, ref Unknown);
}
catch (Exception ex)
{
ZoniacLogger.Error("Exception : " + ex.Message + " Stack Trace : " + ex.StackTrace);
}
finally
{
if (newApp != null)
{
newApp.Quit(ref Unknown, ref Unknown, ref Unknown);
newApp = null;
}
}
}
while executing above code , i get a warning like this :
"Linked style sheets are supported only in web format files. By
saving to this format , all links to style sheets would be lost"
After i click "continue" ,it converts the html document into text file.
How can i avoid such warnings through the program ?
Can anybody help me to overcome this problem. waiting for solution.
regards
kumaran