Free Support Forum - aspose.com

Ole Error

Hi,
I posted this issue in your forum on Monday and I still have not received an answer. Can you let me know how to resolve this, it is very urgent.


"I am getting following error when I try to open a word document in my application

Aspose.Words.PleaseReportException: Cannot find an OLE object. 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. at ᝑ.ᝐ.ᝧ(Int32 ᝨ) at ᝑ.ᶮ.᷁(Char ᪿ, Int32 ᡤ, း ᓭ, ᬯ ᝣ) at ᝑ.ᶮ.ᶺ(း ᓭ, ᬯ ᝣ, ᷑ ᶸ, Int32 ࣂ, Int32 ٠) at ᝑ.ᶮ.ᶹ(Int32 ᝝) at ᝑ.ᶮ.ᶷ(᷑ ᶸ) at ᝑ.ᶮ.ਪ(Int32 ᶶ, Int32 ٠) at ᝑ.ᶮ.ਪ() at ᝑ.ᝐ.ل() at Aspose.Words.Document.ݴ(Stream ӵ, LoadFormat ࿜, String ঝ) at Aspose.Words.Document..ctor(String fileName, LoadFormat loadFormat, String password) at Aspose.Words.Document..ctor(String fileName) at Dennemeyer.DIAMS.Common.CAsposeWordEditor.HasProperty(String sFilename, String sPropertyName) at Dennemeyer.DIAMS.Common.Material.RetrieveMaterial(String sXML) at Dennemeyer.DIAMS.Providers.ServiceRequest.GetMaterial(String sRequestXML) at EIPZone.WebForm1.showElectronicData() at EIPZone.WebForm1.setPageFlow() at EIPZone.WebForm1.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()

Please let me know how to resolve this issue."

Thanks

Raman


This message was posted using Email2Forum by sheliah.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Could you please attach your document for testing? I will investigate this issue and provide you more information.

Best regards.

Hi Alexey,

We are having problem while opening the following 2 documents in our application.

Document 1)

Our document 1 has an image in its content. This document was opening correctly via our application when we were using Aspose.Words.dll(3.2.2.0)

Now we are using Aspose.Words.dll(4.0.2.0) and now this document 1 is not opening via our application.

But if I remove the image from this document1 and add any other image in it then I am able to open this document 1 with latest dll.

Document 2)

Our document 2 has 2 embedded objets. One is a PDF file and another one is WordDocumet.

If I remove these 2 embedded objets then I am able to open this document via our application.

We were able to open these documents with Aspose.Words.dll(3.2.2.0) but not with Aspose.Words.dll(4.0.2.0).

Here I am not able to attach both documets. So please let me know how i should send you both docuemts so that you can do your testing.

Thanks and Regards

Raman

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. You can zip documents and attach archive here. I tried to open this document using latest version of Aspose.Words and no errors occur. Please try using the latest version of Aspose.Words 5.2.0. You can download it from here.

http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry127076.aspx

Best regards.

Hi,

I am also able to open the document without any issue. But when i try to open this document via our application i am getting an error.

Here I am sending the error message page as an attachment.

We want to open this document via our application which was opening fine with old dll(3.2.2.0)

but giving error with new dll (4.0.2.0)

Thanks and Regards

Raman

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Could you please provide me code that will allow me to reproduce this issue? And please try using the latest version of Aspose.Words.

Best regards.

Hi,

We need to add the reference of Aspose.Words.dll in our application.

Can you provide me the Aspose.Words.dll(5.2.0), so that i will add it as a reference in our application and then I will try to open the document.

Thanks and Regards

Raman

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You can download the installation package from here.

http://www.aspose.com/community/files/51/file-format-components/aspose.words/entry127076.aspx

Best regards.

Hi,

I have downloaded the Windows Installation package. But i am not able to find the Aspose.Words.dll

Please guide me how to do it as its very urgent.

Here I am sending the second document which has embedded PDF and Word document, which is giving error when i try to open via our application.

Regards

Raman

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Just install Aspose.Words on your machine. Then you can find Aspose.Words.dll here:

C:\Program Files\Aspose\Aspose.Words\Bin\net2.0\Aspose.Words.dll

I can successfully open the attached file using Aspose.Words 5.2.

Best regards.

Hi,

Thanks for your quick response. But still my issue is not finished.

Now I have added the latest Aspose.Words.dll as a reference in my application. But when i try to compile the code, i am getting following errors. Please let me know if i am missing somthing here.

1) The type or namespace name 'oCell' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'Cell' does not exist in the class or namespace 'Aspose.Words' (are you missing an assembly reference?)


(Aspose.Words.Cell oCell = oTable.FirstRow.Cells[Count];
string sTempColumn = oCell.GetText(); ) -- This is the code line

2)The type or namespace name 'oTable' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'Table' does not exist in the class or namespace 'Aspose.Words' (are you missing an assembly reference?)

(Aspose.Words.Table oTable = (Aspose.Words.Table)oNode;
string sFirstCellContent = oTable.FirstRow.FirstCell.GetText(); )-- This is the code line

3)The type or namespace name 'DocumentProperty' does not exist in the class or namespace 'Aspose.Words' (are you missing an assembly reference?)


Aspose.Words.Document oDocument = new Document(sFilename);
foreach(Aspose.Words.DocumentProperty oProperty in oDocument.CustomDocumentProperties)
{
if (oProperty.Name.Equals(sPropertyName))
{
bRet = true;
break;
}
} -- Code lines

4)
The type or namespace name 'RowAlignment' could not be found (are you missing a using directive or an assembly reference?)

Thanks and Regards

Raman

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

There are some differences in API between 5.x.x and 4.x.x.x versions.

The breaking changes in Aspose.Words for .NET 5.x.x are:

1. All collection classes, such as Paragraphs, Runs, Tables, Bookmarks etc have been renamed into ParagraphCollection, RunCollection, TableCollection, BookmarkCollection, CellCollection accordingly.

2. New namespaces Aspose.Words.Fields, Aspose.Words.Lists, Aspose.Words.Markup, Aspose.Words.Properties and Aspose.Words.Tables were introduced and classes moved into the new namespaces.

Best regards.

Hi,

After all compilation when i try to open the document in my application i am getting following erro

System.InvalidOperationException: The subscription included in this license allows free upgrades until 15 Nov 2006, but this version of the product was released on 15 May 2008. Please renew the subscription or use a previous version of the product. at Ֆ.௉.௙(Stream ם) at Ֆ.௉.௙(String ௚, Assembly ௛) at Aspose.Words.License.SetLicense(String licenseName) at Dennemeyer.DIAMS.Common.CAsposeWordEditor.HasProperty(String sFilename, String sPropertyName) in c:\sgupte_new_view_r3p2\projects\development\webdiamssolution\diamscommon\casposewordeditor.cs:line 78 at Dennemeyer.DIAMS.Common.Material.RetrieveMaterial(String sXML) in C:\sgupte_New_View_R3P2\projects\development\webdiamssolution\DIAMSCommon\Material.cs:line 410 at Dennemeyer.DIAMS.Providers.ServiceRequest.GetMaterial(String sRequestXML) in C:\sgupte_New_View_R3P2\projects\development\webdiamssolution\ServiceProvider\ServiceRequest.cs:line 174 at EIPZone.WebForm1.showElectronicData() in C:\sgupte_New_View_R3P2\projects\development\webdiamssolution\eipzone\VinKit-Common\ShowRefMaterial.aspx.vb:line 95 at EIPZone.WebForm1.setPageFlow() in C:\sgupte_New_View_R3P2\projects\development\webdiamssolution\eipzone\VinKit-Common\ShowRefMaterial.aspx.vb:line 75 at EIPZone.WebForm1.Page_Load(Object sender, EventArgs e) in C:\sgupte_New_View_R3P2\projects\development\webdiamssolution\eipzone\VinKit-Common\ShowRefMaterial.aspx.vb:line 46 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()

Dose this means i have to purchase this or what?

Please let me know regarding this.

Thanks and Regards

Raman

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. This error occurs because your license was expired. Every Aspose license carries a one-year subscription for free upgrades to any new versions or fixes that come out during this time.

You can contact our purchas team to renew your license.

http://www.aspose.com/community/forums/aspose.purchase/220/showforum.aspx

Best regards.

Hi,

we have renewed our license on 12/5/2007.

Here I am sending you the detail as an attachment.

Please let me know why i am getting the following error

"The subscription included in this license allows free upgrades until 15 Nov 2006, but this version of the product was released on 15 May 2008. Please renew the subscription or use a previous version of the product."

Thanks and Regards

Raman

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Most probably your application still uses old license file. You can open license file using Notepad and check its expiration date.

You should see the following tags there:

20090409

This means that expiration date of this license is 09th April 2009.

Also you can attach your license here for testing.

Best regards.

Hi,

I have checked the license file and the expiration date is
20081204

Here I am attaching my license for testing.

Thanks and Regards

Raman

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Sorry but this is license for another Aspose product – Aspose.Network.

Aspose.Network

You should also have license for Aspose.Words.

Best regards.

Hi,

When I apply the latest license file for ASPOSE.WORDS, now I am able to open the word document.

But my word document have embedded word document in it which I am not able to open.

Please let me know how to resolve this issue?

Thanks and Regards

Raman

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You can use the following code for extracting embedded OLE objects from your document.

Document doc = new Document(@"Test207\in.doc");

NodeCollection shapes = doc.GetChildNodes(NodeType.Shape, true);

int i = 0;

foreach (Shape shape in shapes)

{

if (shape.OleFormat != null)

{

shape.OleFormat.Save(@"Test207\obj_" + i.ToString() + ".doc");

i++;

}

}

Could you please also attach your document here for testing?

Best regards.