I am trying to open a word document that was created with an Older version of Aspose.Word. When I call the Open() with a file path. An exception is raised. It is Stylesheet is missing. Any help would be verrrry appreciated Here is the method:
Dim strFiles() As String = System.IO.Directory.GetFiles(Global.g_TempDirectory, "*.doc")
If IsNothing(strFiles) = False AndAlso strFiles.Length > 0 Then
Dim iPos As Int32 = 0
Dim inStreams(strFiles.Length - 1) As System.IO.Stream
Dim pdfEditor As PdfFileEditor = New PdfFileEditor
Dim strFileName As String = String.Empty
For Each strfile As String In strFiles
'Save the document in Aspose.Pdf.Xml format into a memory stream.
'Dim stream As MemoryStream = New MemoryStream
'Seek to the beginning so it can be read by XmlDocument.
Dim doc As New Document
Dim docMS As New MemoryStream
Dim wrd As New Word
'doc = New Document(strfile)
wrd.Open(strfile).Save(strfile.Replace(".doc", ".xml"), SaveFormat.FormatAsposePdf)
'Load the document into an XmlDocument
Dim xmlDoc As XmlDocument = New XmlDocument
'Load the file
'Load the XML document into Aspose.Pdf
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf
'Make sure the images that were saved by Aspose.Word into Windows temporary
'folder are automatically deleted by Aspose.Pdf when they are no longer needed.
pdf.IsImagesInXmlDeleteNeeded = True
strFileName = strfile.Replace("doc", "pdf")
'Now produce the PDF file.
'pdf.Save("Aspose.Word.Demos.pdf", Aspose.Pdf.SaveType.OpenInBrowser, Me.Response)
Catch ex As Exception
txtError.Text = ex.Message