Some body help me
I got error when we use below code [i m doing .docx to ,htm file coversion meas save file .docx to .htm]
Code is-
Microsoft.Office.Interop.Word.Application app;
app.Documents.Open(ref FileName, 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, ref missing);
Document oDoc = app.ActiveDocument;
oDoc.SaveAs(ref FileToSave, ref fltDocFormat, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing);
Error is-
This command is not available because no document is open.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Runtime.InteropServices.COMException: This command is not available because no document is open.
Source Error:
|

Rajeesh MenothRank #118 · 18.4K reputationPosted Jun 28, 2015, 10:54 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Jun 28, 2015, 11:06 PM EDT
Vijay Maurya4 reputationPosted Jun 28, 2015, 11:07 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Jun 29, 2015, 12:10 AM EDT