This object has no OLE automation interface

Hi
I get the message in notes log as "This object has no OLE automation interface" and i also get "object variable not set" at the statement
Set excelAppObject = handle.Application

WHY? could anyone help me in this.... What should i do to make the object OLE automation interface?

thanks in advance.

Here is the code i have written.........

Dim object As NotesEmbeddedObject
Dim strAttachmentName As String
Dim handle As Variant
Dim excelAppObject As Variant

strAttachmentName=doc.GetItemValue("$File")(0)
          Set object = doc.GetAttachment(strAttachmentName) 'Gets the attachment from the document
     
     If ( object Is Nothing ) Then
             Set object = doc.GetAttachment( "" )
     End If
     
     Set handle=object.Activate(False)
     If ( handle Is Nothing ) Then
     Msgbox "This object has no OLE automation interface"
     Else
     Msgbox "This object has an OLE Automation interface"
     End If
        Set excelAppObject = handle.Application
     
skancherlaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HemanthaKumarCommented:
You cannot activate the attachment directly as an OLE object. Check the activate method's usage section.

What you can do is extract the file to local dir and then use CreateObject method of NotesEmbeddedobject to get the handle to the object and then use activate method.

~Hemanth
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
skancherlaAuthor Commented:
object is already created, and it holds the attachment.
here is the syntax...

If ( object Is Nothing ) Then
            Set object = doc.GetAttachment( strAttachmentName )
    End If



doc is having the attachment..and the object having the attachment..then why to again create the object..please explain me..Thanks
0
skancherlaAuthor Commented:
Now i get this error
208: Cannot create automation object

for the script below....

     
'Set object=rtitem.GetEmbeddedObject(strAttachmentName)
     If ( object Is Nothing ) Then          
          Set object = doc.GetAttachment( strAttachmentName )
     End If
     
     Call object.Extractfile("c:\Temp\"+strAttachmentName)
          'Launch Excel,
     Set object=CreateObject("Excel.Application")


0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

HemanthaKumarCommented:
Do you have excel installed ?

The method I described is related to NotesUIDocument...CreateObject !

0
skancherlaAuthor Commented:
Yes it is installed
0
skancherlaAuthor Commented:
Tell me Excel has to be installed even on Domino Server?
On my PC it is installed!
0
HemanthaKumarCommented:
OLE is client dependent not server side. BTW, how are u running the script ???
0
skancherlaAuthor Commented:
Our Application is on the Domino server and i am running the lotus script by calling Agent in WebQuerySave.
0
HemanthaKumarCommented:
In web OLE doesn't work

This question (http://www.experts-exchange.com/jsp/qShow.jsp?ta=lotusnotes&qid=11473339) of cost 30 points, and  is something similar to yours.

Whole discussion Follows::::

=============================

I would like to embed excel worksheets in my notes pages which are mainly meant for
                     web users.  But
                     I have faced some problem with it...

                     1) I would like to change the link to the embedded worksheet using formulas. Is there anyway I can do
                     it?

                     2) I noticed that the embedding area is limited. In other words, if my worksheet exceeds a certain number
                     of rows, the content below which will be truncated. Is there any way to specify the size of the embedded
                     object?

                     3) When I embed a workbook which contains say 3 sheets, in my embedded object, I can only choose one
                     of the sheets to display. Is there anyway I can view all three sheets?

                     Please take note that I want to achieve all those mentioned above in a brower. Any help to answer one
                     of those would be appreciated.

                     This is very urgent. Thank you very much for your help in advance. :) Cheers!

                      Accepted Answer

                     From: stamp
                                                                            Date: 10/12/2000 11:33AM PST
                                                       Text Below

                      Question History

                      Comment

                     From: tszwang
                                                                            Date: 10/10/2000 05:31PM PST
                     Hi Stamp,

                     It works. But I have a problem here. The guy who will be administrating the website want to do minimal
                     maintenance. Is there a way to automate the cutting and pasting of the Excel sheet into the tabs? :)

                     Thank you very much for your help. :)

                      Comment

                     From: tszwang
                                                                            Date: 10/08/2000 04:54PM PST
                     Hi Stamp,

                     I am very new to Notes and I did the embedding by hand. Can you pass me some sample code on how to do
                     embedding by hand? :)

                     As for the excel sheet. My idea is to get it from a view(the Excel file is already attached to one of
                     the forms, submitted and sorted in a view). Would it be possible to do it this way?

                     My ultimate goal is to show an embedding worksheet on a form/page from attachments found in a view.
                     Would this be possible.

                     Also, I have this question that the embedded view of the worksheet has a maximum dimension beyond which
                     part of the worksheet cannot show... is this a limitation of Notes 5?

                     Three row and one column at a time seem a bit small for a user... but it would be interesting for me
                     to take a look and see if it can be used for my case. Can you please send some sample code on this?
                     :)

                     Oh, I have some formatting on the worksheet which I want to retain. Would it be possible for your suggested
                     method?

                     Thank you very much for your help. :)

                     Cheers!

                      Comment

                     From: tszwang
                                                                            Date: 10/06/2000 09:42PM PST
                     The original file is in Excel and contains a lot of formating... so your suggestion might not good for
                     my application. Do you have any other suggestions for my application? Thank you very much for your reply.
                     :) Cheers!

                      Comment

                     From: tszwang
                                                                            Date: 10/12/2000 04:54PM PST
                     Getting the values in itself might not be sufficient as there are still other formatting issues... :)
                     Thank you very much for your help. Cheers!

                      Comment

                     From: tszwang
                                                                            Date: 10/12/2000 04:53PM PST
                     I actually solved this problem with another way. I converted the excel sheet into pdf format and when
                     user click on the icon, it will open up for viewing. :)

                     Thank you very much for your info and help. :) Cheers!

                      Comment

                     From: tszwang
                                                                            Date: 10/11/2000 04:27PM PST
                     Is it possible to extract the excel from one of the views within Notes? Also, I noticed that the table
                     method has a limit to the number of rows it can display... are you aware of this? :)

                     Cheers!

                      Comment

                     From: stamp
                                                                            Date: 10/11/2000 12:10PM PST
                     Ok, then please. Are the *.xls files allready attached or placed in a specific directory on disk or
                     have to be collected at job time?

                      Accepted Answer

                     From: stamp
                                                                            Date: 10/12/2000 11:33AM PST
                     the attachments or embedded pictures are ollways in NotesDocuments.
                     You see only this documents sorted in a view.

                     Yes, it posible to detach this attachments in background agents to Domino servers or NotesClient disk,
                     then to start invisibly Excel, get the values from Excel cels and place it in NotesDocument for display
                     in NotesClient or on web.
                     But I know no method to transfer the Excel picture (for example charts) and paste it into NotesDocument
                     in background. This only possible in NotesClient user interface. If you allready see in NotesDocument
                     the Excel picture, then it is allready pasted in (embedded not attached). Than it is possible to transfer
                     this embedded pictures into NotesDocument.

                     When you open one NotesDocument from this view containing Excel, than do you see only the xls symbol
                     or the complete Excel sheet?

                      Comment

                     From: stamp
                                                                            Date: 10/08/2000 02:20PM PST
                     do you have any code to exted.
                     For example do you do your actual embeding by hand or LotusScript.

                     Next question is: where to get the Excel sheet from? From allready embeded,attached parts or from disk
                     file.

                     Important last question: would it be for you a solution to have three rows of table with one column,
                     showing one row (Excel sheet as gif) at a time (for this you need a DominoR5 server)?

                      Comment

                     From: stamp
                                                                            Date: 10/10/2000 02:40PM PST
                     I mean by hand doing it like this:

                     go into a document having a richtext field (for example your mail file, new memo).
                     Place the cursor into richtext field.
                     Create a table with three rows one column and second table type.
                     This second table type shows you one row at a time selecting them with tabs.
                     Place into first tab the first sheet from Excel and switch to second tab and so on.
                     Save this memo and open it in your browser.

                     You can now switch the tabs and look the single sheets.

                     Is this one posible way?

                      Comment

                     From: HemanthaKumar
                                                                            Date: 10/10/2000 07:27AM PST
                     Hi tszwang

                     When I was searching for some information & I hit this site, thought it might be useful for you. Read
                     the article at

                     http://support.microsoft.com/support/kb/articles/q169/7/96.asp


                     PS: From the article I infer that there is no easy way of showing excel on web.

                     ~Hemanth

                      Comment

                     From: HemanthaKumar
                                                                            Date: 10/06/2000 05:56AM PST
                     Hi

                     You cannot use excel as OLE in browser.

                     As a workaround you can generate a flat file with data and open excel file and populate each cell using
                     VBA code from the text file & that works.

                     ~Hemanth

=======================
0
skancherlaAuthor Commented:
Could you please take some file as an example and send me the code which works..

Thanks Hemanth!
0
skancherlaAuthor Commented:
Hi Hemanth,
stamp says:
Yes, it posible to detach this attachments in background agents to Domino servers  or NotesClient disk, then to start invisibly Excel, get the values from Excel cels and place it in NotesDocument for display on web.

i dont know how it is possible for stamp...Its urgent hemanth!! could you please help me out.

Thanks,
0
ZvonkoSystems architectCommented:
skancherla,
No comment has been added lately (947 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to HemanthaKumar http:#6310196
Please leave any comments here within 4 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

Zvonko
EE Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.