Hi,
I am convert word document into html by using Spire.Doc but it will not convert into html ,it gives error as
System.NullReferenceException: Object reference not set to an instance of an object.
at spr?.?(Image A_0)
at spr?.?(DocPicture A_0)
at spr?.?(Paragraph A_0)
at spr?.?(Section A_0)
at spr?.?(Document A_0)
at spr?.?(Document A_0, String A_1)
at spr?.?(Document A_0, String A_1)
Code is:
using System;
using System.Collections.Generic;
using System.IO;
using Spire.Doc;
namespace SSRN
{
class Program
{
static void Main(string[] args)
{
Document document = new Document();
document.LoadFromFile(FileOnLocalMachine + fileName, Spire.Doc.FileFormat.Docx);
htmlFileName = fileName.Replace(".docx", "");
//converting/saving the file to html format in the local path
document.SaveToFile(FileOnLocalMachine + htmlFileName + ".html", Spire.Doc.FileFormat.Html);
}
}
}
Please help.
Thanks,
Mahesh Ingole