Solved

This object has no OLE automation interface

Posted on 2001-07-23
13
1,033 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Do you have excel installed ?

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

0
 

Author Comment

by:skancherla
Comment Utility
Yes it is installed
0
 

Author Comment

by:skancherla
Comment Utility
Tell me Excel has to be installed even on Domino Server?
On my PC it is installed!
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 24

Expert Comment

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

Author Comment

by:skancherla
Comment Utility
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
Comment Utility
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
Comment Utility
Could you please take some file as an example and send me the code which works..

Thanks Hemanth!
0
 

Author Comment

by:skancherla
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

10 Experts available now in Live!

Get 1:1 Help Now