I’m just getting started with both Visual Studio 2005 and Aspose.Words, so forgive the really basic question.
I’ve created a new Web Site and used “Add Reference” to pull in Aspose.Words. In the Solution Explorer pane, under the Bin directory, I see “Aspose.Words.dll” and “Aspose.Words.xml”.
I’ve dropped a button onto the Default.aspx page and I’m coding directly in the button. My first problem is that in the VB code for the button, I cannot use:
Dim doc as Document = new Document("c:\test\test.doc")
Instead I have to use
Dim doc as Aspose.Words.Document = new Aspose.Words.Document("c:\test\test.doc")
TextBox1.Text = doc.BuiltinProperties.Title
How can I add that namespace to the website project so I don’t have to refer to it (Aspose.Words.Document)? (I’m a Java developer coming into the .NET world for the first time! I didn’t see an “import” statement).
My second problem is that (even with the explicit namespace), when I run the very simple code above, I get an error:
Aspose.Words.PleaseReportException was unhandled by user code
Message="**Unknown complex shape property id:910**. For free technical support, please post this error and the file in the Aspose.Words Forums http://www.aspose.com/forums/ShowForum.aspx?ForumID=75."
Source="Aspose.Words"
Thanks for your help. My company will become a (paying) customer as soon as I can get the trial version to work!
Okay, I’ve discovered “Imports” and resolved the namespace problem.
I’m still getting the error message however when the line 3 (below) executes:
Unknown complex shape property id:910. For free technical support, please post this error and the file in the Aspose.Words Forums http://www.aspose.com/forums/ShowForum.aspx?ForumID=75.
I have been successful in using Aspose.Words to create a new document, but I just can’t open an existing file. Very puzzling.
Here’s my complete (very simple, but non-working) code:
Dim filename As String
filename = "C:\AsposeWork\Document1.doc"
Dim doc As Document = New Document(filename)
TextBox1.Text = doc.BuiltInDocumentProperties.Title
There seem to be some undocumented binary structure in that document that we don’t know how to handle yet. Please attach the document. We will research and fix this problem by the time of the next release which will be published in a few weeks.
These issues were caused by some obscure shape attributes related to javascipt. You paste HTML from a website and HTML contains javascript and MS Word actually embes javascript into the Word documents. We did not even know this was possible.