OLE Automation to Word 7 for Mail Merge...
I am trying to use OLE Automation out to Word for Windows 95 Version 7.0
from PB 6.5 (build 444) to do a mail merge.
My problem is that I and am getting a null reference on my OLEObject
The ConnectToNewObject statement works with a 0 return code, but then
very next reference to lole_msword gives me a null reference!
I have tried adding Object to the dot notation. eg.
lole_msword.Object.Activate(InPlace!) - does not help.
I have tried the examples in Chapter 19, Using OLE in an Application
in the App Techniques manual but don't get anywhere.
Any help would be...Ole to Word 95 (Word 7)
I am trying to get Word to retrieve a document and come into focus.
The ConnectToObject is working fine. The retrieve is working fine. The
only problem that I am having is getting Word to pop-up if it is
currently minimized. If it is not minimized, a AppActivate() command
works fine. I have tried AppMaximize(),AppShow() and AppRestore(). If
Word is minimized, none of these work. Anyone have any ideas ??
I use API functions like Showwindow()
Kevin Wydra wrote:
> I am trying to get Word to retrieve a document and come into focu...WORD OLE automation
The following code works perfectly with WORD6/Windows95/PB6, but does
not work for WORD 97/NT.
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
// Not recognised by WORD97
...can i use pb's automation server to create an activex/ole/ocx? help me!
Please do not cross-post.
Roy Kiesler [TeamSybase]
MySybase -- http://www.sybase.com/mysybase
"tadsun" <email@example.com> wrote in message
...WordPerfect: OLE automation through OLE control
OK, I connected to WordPerfect from PB6.5 by using OLEObject like:
ole_obj= CREATE OLEobject
Now it accepts automation commands.
But my goal is to start OLE automation through Object property of OLE
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
...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.
Butte County (CA) Migrant Education
In article...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.
...MS-Word & Powerpoint automation, using OLE automation [Edit]
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 memory leak in PB 7 w/SQL Server 7
I am experiencing a severe memory leak while using OLE Automation in PB
7.0.1 (7023), MS Word 2000 and SQL Server 7 (SP1). I have made sure all
OLEObjects CREATEd are DESTROYed at the end of my scripts, yet the problem
still exists. I have also experimented with different DBParm entries. Same
Anyone experience the same or have a possible solution?
Robert Wren, Jr.
...Word 6 OLE automation
I'm using OLE automation with Word 6 to perform a mail merge. Most of the
methods work OK (FileOpen, FilePrint etc.) but some of them don't
PB says : Error calling external object function blablabla ...
The function's name is OK, and the parameters also.
I've debugged the externalexception event, and the OLE server tells me that
I've tried to handle an element like a function when it isn't.
The bizarre thing is that, calling a macro with that instruction (FileClose)
Perhaps the solution is putting all the code in the macro ?
...OLE Word97 and ole objects vs ole controls
Content-Type: text/plain; charset=us-ascii
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
I'm getting the following error in my log file:
DateTime: 10/27/99 18:32:07 Title: System Error Message: Error Number
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...Word Automation through Win32::OLE
Long time lurker, first time poster...please be gentle.
I am attempting to move through a directory, pull out only files of a
..fin extension (which is Word document format), save each one as .rtf
(Rich Text Format). I'd also like to be able to run some predefined
macros on the files, but I thought just being able to save was a good
place to start.
Currently I get an error stating 'Can't call method "SaveAs" on an
If someone could point me to some clearer text on Win32::OLE than the
stuff that ASPN, CPAN and Oreilly's Win32 o...OLE automation with word 97
Dear Sir /Madam
I like to ask about how to use the oleobject with Word 97, On word 95 and
its predecessor, its clear to use "word.basic" but the speed is very slow
compare with other OLE connectivity, So I try with word 97, but the format
and function of word 97 is very different from the previous ones, they use
VBA (for visual Basic Command), So I like to ask if to use OLE with word97
to connect and merge letter with data supplied by PowerBuilder, like code
below, what is the corresponding code in word 97?, or Does PowerBuilder
5.0 does not support Word 97 or vice-versa. ...