OLE Automation and MS Word - What Amazing Performance

In evaluating the feasibility of using PB for an application that will
use OLE Automation to interface with MS Word, I wrote some exploratory
code to determine how efective PB would be as a 'driver' for OLE
automation.



I have a really simple test application that contains the following
snippet of code:



  integer li_count

  string  ls_bookmark

  

  li_count    = iole_worddoc.CountBookmarks

  ls_bookmark = iole_worddoc.bookmarkname(1)

  ls_bookmark = iole_worddoc.bookmarkname(2)



The first line executes in less then 1/2 second.  The second line takes
29- 30 seconds, and the third line takes 45 - 46 seconds.  This
performance is so fantastic that I got curious and wrote the same code
in a bare-bones VB 5.0 application and discovered that all three lines
took less then 1/2 second combined to execute.  I am in no way
advocating VB as a replacement, but cannot believe that there would be
such a difference in performance.  I ran my tests over a dozen times and
the times remained very constant.



The full application I want to develop will have, give or take, around
40 bookmarks which would translate to around 20 to 30 minutes just to
retrieve a list of bookmarks from a word document - clearly
unacceptable.



Are there any known problems with PB when making OLE 2.0 calls that
return a string?  Does 5.03 make any improvements?  I'm currently PB
5.0. Will 5.03 offer any improvements?



Any ideas or suggestions would be most welcome, and no, I have no
interest in switching to VB, Delphi, or brand-x.

0
Austin
7/28/1997 4:52:04 AM
sybase.ole-ocx-activex 6324 articles. 0 followers. Follow

1 Replies
624 Views

Similar Articles

[PageSpeed] 28
Get it on Google Play
Get it on Apple App Store

Yes, PB 5.0.03 should make an enormous difference.
-- 
- Met vriendelijke groet,

  Eric Aling [TeamPS], Cypres Informatisering bv, The Netherlands
  http://ourworld.compuserve.com/homepages/alingejj


Austin Durbin <adurbin@earthlink.net> wrote in article
<33DC2574.642F@earthlink.net>...
> In evaluating the feasibility of using PB for an application that will
> use OLE Automation to interface with MS Word, I wrote some exploratory
> code to determine how efective PB would be as a 'driver' for OLE
> automation.
> 
> 
> 
> I have a really simple test application that contains the following
> snippet of code:
> 
> 
> 
>   integer li_count
> 
>   string  ls_bookmark
> 
>   
> 
>   li_count    = iole_worddoc.CountBookmarks
> 
>   ls_bookmark = iole_worddoc.bookmarkname(1)
> 
>   ls_bookmark = iole_worddoc.bookmarkname(2)
> 
> 
> 
> The first line executes in less then 1/2 second.  The second line takes
> 29- 30 seconds, and the third line takes 45 - 46 seconds.  This
> performance is so fantastic that I got curious and wrote the same code
> in a bare-bones VB 5.0 application and discovered that all three lines
> took less then 1/2 second combined to execute.  I am in no way
> advocating VB as a replacement, but cannot believe that there would be
> such a difference in performance.  I ran my tests over a dozen times and
> the times remained very constant.
> 
> 
> 
> The full application I want to develop will have, give or take, around
> 40 bookmarks which would translate to around 20 to 30 minutes just to
> retrieve a list of bookmarks from a word document - clearly
> unacceptable.
> 
> 
> 
> Are there any known problems with PB when making OLE 2.0 calls that
> return a string?  Does 5.03 make any improvements?  I'm currently PB
> 5.0. Will 5.03 offer any improvements?
> 
> 
> 
> Any ideas or suggestions would be most welcome, and no, I have no
> interest in switching to VB, Delphi, or brand-x.
> 
> 
0
Eric
7/29/1997 5:39:53 PM
Reply:

Similar Artilces:

MS-Word & Powerpoint automation, using OLE automation [Edit]
Hello, Here is what I need to do, from my Delphi application : starting from a MS-Word document, create a PPT presentation simply made of a series of embedded MS-Word objects. There would be 1 slide for each page of the source document (assuming same page size & orientation on both sides). This requires to control both a WordApplication and a PowerpointApplication in parallel, and proceed basically as follows : - in Word, open the source file - In Powerpoint, create a new presentation - For each page of the Word doc, |- in Word, select from start to end of current page, then &quo...

OLE Automation with Delphi and MS Word
Hi, I'm working with Delphi for a while now, but it's the first time that I need to export in Word some data taken from a sqlite database. With SQLite there are no problems, everything works as it should. With Word, also because of the lack of good part of documentation, I'm currently having troubles, in particular, in the moment when i go to split a cell of a table, depending on the number of occurrences found with a SQLite query (1 occurrence = do nothing, 2 occurrences = split the cell into two rows, 15 occurrences = split the cell into 15 rows and so on). When i create ...

OLE Automation with Delphi and MS Word [Edit]
Hi, I'm working with Delphi for a while now, but it's the first time that I need to export in Word some data taken from a sqlite database. With SQLite there are no problems, everything works as it should. With Word, also because of the lack of good part of documentation, I'm currently having troubles, in particular, in the moment when i go to split a cell of a table, depending on the number of occurrences found with a SQLite query (1 occurrence = do nothing, 2 occurrences = split the cell into two rows, 15 occurrences = split the cell into 15 rows and so on). When i create ...

Word ole: How to close MS word
I have ole control on the window and inset file using Ole_control.InsertFile(file_name) When I close the window I still see the word running in task manager. How do I close Word? How about looking at the Quit method? Katarina wrote: > I have ole control on the window and inset file using > Ole_control.InsertFile(file_name) > > When I close the window I still see the word running in task > manager. How do I close Word? ...

WORD OLE automation
The following code works perfectly with WORD6/Windows95/PB6, but does not work for WORD 97/NT. OLEObject lole_word string ls_mytext = "Trial text" li_rc = lole_word = CREATE OLEObject li_rc = lole_word.ConnectToNewObject("word.basic") // in NT WORD is opened INVISIBLY // It appears as a process in the Task Manager // li_rc = 0 li_rc = lole_word.FileNew("normal", 0) // Returns li_rc = NULL li_rc = lole_word.Insert(ls_mytext) // Not recognised by WORD97 li_rc = ...

can i use pb's automation server to create an activex/ole/ocx? help me!
Please do not cross-post. -- <hopethishelps/> Roy Kiesler [TeamSybase] MySybase -- http://www.sybase.com/mysybase "tadsun" <tadsun@163.com> wrote in message news:UXo0Ru7BCHA.201@forums.sybase.com... > > > ...

WordPerfect: OLE automation through OLE control
OK, I connected to WordPerfect from PB6.5 by using OLEObject like: OLEObject ole_obj ole_obj= CREATE OLEobject li_rc=ole_obj.ConnectToNewObject ("WordPerfect.PerfectScript") ........ Now it accepts automation commands. But my goal is to start OLE automation through Object property of OLE control. Something like: ole_1.Activate(Offsite!) ole_obj=ole_1.Object.WordPerfect.PerfectScript ..... And that does not work though it does with Word. Does somebody know if it is possible at all to make OLE automation through OLE control and how to do that? Thanks ...

OLE with MS Word
Hello all, Where can I find a list of Active X commands to control MS word. I'm trying to do: ole_1.Object.SaveAs("c:\test.doc") but "Save As HTML" instead. I would like to find a list of all the commands to carry out various functions. Thanks for reading! Rick This is all wriiten down in the Office developers books. Best place to search on the internet is http://msdn.microsoft.com HTH -- - Eric Aling [TeamSybase], Avalix Information Systems, The Netherlands Eric's Home & PB Site @ http://www.knoware.nl/users/cypr115 ...

OLE and MS Word
Hello, I'm looking for a simple application that creates a Word document (*.doc) and writes some text there without opening Word and then closes the connection to that OLE object... Thanks in advance... Have you tried looking at http://www.sybase.com/detail?id=47980 Just a hint. You can search the Sybase tech docs from http://www.sybase.com/support/techdocs Good luck, Terry [TeamSybase] and Sequel the techno-kitten On 3 Feb 2004 02:40:13 -0800, "Piotr Nadolny" <pnad@o2.pl> wrote: >I'm looking for a simple application that creates ...

Word OLE automation
Would like to open word document using OLE after populating word using OLE Automation. The document should open up in print preview mode,and then using either VBA, or other code print or close from print preview. I want to supress all menus and commandbars from the word document. What code can i run from PB script to open in print preview and turn off menus and command bars, and put in two of my own command buttons. ...

Word OLE automation
I am about to embark on a PB 5.0 project that will require dynamic creation of documents for use with Word 97's mail merge capability. Being that this is my first time using OLE, as well as my first time programming Word, could anybody point me in the right direction (books, articles, web sites, etc.) to get me started? I've experimented a little with what I could find on Microsoft's and Sybase's sites, but I am looking for something more comprehensive. =============== Daniel Buki Software Developer Butte County (CA) Migrant Education cerkit@ncal.net In article...

OLE (MS-Word) Control
Hi everybody! I hope I say this all correctly, cause I have only about 6 months experience with PowerBuilder. I'm using version 6.5.1 of PowerBuilder... I have a datawindow where I have placed an OLE control (an MS-Word doc built in Office 97) in the detail band of the datawindow. The Word document is "linked" not "imbeded". The idea is to merge some addresses (Sybase columns) with the Word doc and print it. All of that works great, however once I print the datawindow (using PFC_PRINT), my mouse will appear normal, but clicking on anything, anywhere in...

OLE Word97 and ole objects vs ole controls
--------------50D299EA9D99A20C83E801AB Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I am new to OLE automation. I'm trying to connect to a word97 document and filling forms fields with information. I'm trying to use the following code. I'm getting the following error in my log file: DateTime: 10/27/99 18:32:07 Title: System Error Message: Error Number 36. Error text = Name not found accessing external object property object. Window/Menu/Object = w_ole_test. Error Object/Control = cb_okay. Script = clicked. Line in Script = 22. ...

ActiveX, OLE Automation, OLEStorage
1.) Does anyone know how to create an ActiveX control in PB 6.0 or 6.5? 2.) I have utilized OLE automation to use some functionality of Excel and Word. Unfortunately, whenever I use the ConnectToNewObject() or ConnectToObject() functions of an OLEObject variable, either the entire application of Word or Excel application is opened behind the scenes. This is the case even though I only want to use a single function within these applications. It seems like a waste to load the entire application to get just at simple functionality. Is it possible to open lightweight component applicatio...

Web resources about - OLE Automation and MS Word - What Amazing Performance - sybase.ole-ocx-activex

Performance - Wikipedia, the free encyclopedia
A performance , in performing arts , generally comprises an event in which a performer or group of performers behave in a particular way for ...

Master & Dynamic MW60 wireless headphones offer style and performance
Priced at £419 (€579/$549), there's no denying that Master & Dynamic's wireless MW60 headphones are expensive—but boy do they look it. Cast out ...

Consumers value this in-car technology more than driving performance
... by the infotainment screen has been growing over the past year. In fact, consumers value in-car technology more than the car's driving performance, ...

‘Steve Jobs’ Composer Daniel Pemberton: Video Of ‘Circle Of Machines’ Performance
One of the tracks Daniel Pemberton composed for awards contender Steve Jobs is ‘Circus of Machines’. The operatic piece that was performed last ...

Ariana Grande Ditches Her Signature Ponytail For a Burlesque-Inspired AMAs Performance
Ariana Grande Ditches Her Signature Ponytail For a Burlesque-Inspired AMAs Performance

Supercomputing Trends: Performance Lags, China Rises, Cray Gains
While the overall performance of systems continues to increase, that growth continues to slow. We look at these and other supercomputing trends. ...

AMD’s new Radeon Crimson software crushes Catalyst, boosts performance
AMD has launched a complete overhaul of its driver stack today, with new performance boosting features, per-game overclocking, shader cache support, ...

Review: 'The Danish Girl' Saved By Powerful Performance, Striking Cinematography
It is sad that, despite progress toward greater equality and recognition of the human rights of marginalized people and communities, we live ...

Miranda Lambert On Gwen Stefani’s AMAs Performance – My Heart Goes Out To Her - Hollywood Life
Gwen Stefani is dating Miranda Lambert's ex-husband, but her performance of 'Used To Love You' at the AMAs on Nov. 22, made Miranda feel nothing ...

Jennifer Lopez Conquers The 2015 American Music Awards With Show-Stopping Performance
Pop diva Jennifer Lopez opened the 2015 American Music Awards with a show-stopping performance to a medley of hit songs and an epic change of ...

Resources last updated: 11/29/2015 8:48:08 AM