Solved

This object has no OLE automation interface

Posted on 2001-07-23
13
1,045 Views
Last Modified: 2013-12-18
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
     
0
Comment
Question by:skancherla
  • 7
  • 4
13 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
ID: 6310196
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
 

Author Comment

by:skancherla
ID: 6310323
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
 

Author Comment

by:skancherla
ID: 6310364
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
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6310713
Do you have excel installed ?

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

0
 

Author Comment

by:skancherla
ID: 6310803
Yes it is installed
0
 

Author Comment

by:skancherla
ID: 6310807
Tell me Excel has to be installed even on Domino Server?
On my PC it is installed!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6312471
OLE is client dependent not server side. BTW, how are u running the script ???
0
 

Author Comment

by:skancherla
ID: 6318122
Our Application is on the Domino server and i am running the lotus script by calling Agent in WebQuerySave.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6319436
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
 

Author Comment

by:skancherla
ID: 6319893
Could you please take some file as an example and send me the code which works..

Thanks Hemanth!
0
 

Author Comment

by:skancherla
ID: 6319966
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
 
LVL 63

Expert Comment

by:Zvonko
ID: 10476303
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now