Problem with Embedded Object

Hi All,

I am using the following code to embed an object

Set object = rtitem.EmbedObject ( EMBED_OBJECT, “.xls”, “”, “Report” ).

Its throwing an error “Embedded Object class not found in Registry”. Can anyone tell me why this error is being shown.

Thanks in Advance.

Subject: Problem with Embedded Object

Hello from Valencia Madhan,

It seems that the .xls is not a recognised extension…

Try this: Set object = rtitem.EmbedObject (EMBED_OBJECT, “”, “c:\my Reports\Report.xls”)

where the second parameter is empty and the third parameter is the full path yo your report.

Let me know if it works to you. I hope that… :wink:

Josep

Subject: RE: Problem with Embedded Object

I am trying to embed an excel sheet which is not saved in the hard disk…

Subject: RE: Problem with Embedded Object

Then, I will do something like that:

1.-Use a OpenFileDialog to obtain all the path.

2.-Test if it is empty (we nust be sure).

3.-Then embed the object as I tall before using the filenames(0).

filenames = workspace.OpenFileDialog(False, “Selecct an excel document”,“|*.xls|”, “C:\My Documents”)

If Not(Isempty(filenames)) Then

Set object = rtitem.EmbedObject(EMBED_OBJECT, “”,filenames(0))

end if

Try it…

Josep