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
...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 Word and Powerbuilder
Please help if someone knows how to convert Visual Basic commands to
Powerbuilder. I create bookmarks on the fly and populate them with descriptions.
Some descriptions I have to insert with tabbing or indentions. I need correct
syntax for Powerbuilder. What I used is not working.
iole_object.Selection.Font.Underline = False
iole_object.Selection.Font.Bold = False
These commands are fine. I have no problems.
Powerbuilder doesn't accept commands like :
1) iole_object.Selection.Paragraph.TabIndent or
iole_object.Se...OLE From Word To PowerBuilder
I have been having a problem, I have a PB App that uses Word to open
documents stored in a database. When a document is open, a Word macro is
executed that searches the letter for a place where there needs to be a
signature. If there is a signture needed, it communticates back to
PowerBuilder that the current user signature is needed. It works great
with DDE, but I run into a problem with OLE. How do cummunicate with a
PowerBuilder Appilcation that is already running? As it is right now, I
have to build a runtime DLL, or use the "PowerBuilder.Application" an...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 Automation with Word 7
All my users and fellow developers are on Word v7.0a (which does not
and only I happen to have 7.0 (which works). I've tried background
printing on and off in Word. The routine loops through multiple records
as shown beloew.
The first run through is fine. It fails on the second record at the
I tried adding wait loops of 10 seconds (!) after the fileprint and the
fileclose - to no avail. The error is "Error calling external object
fileopen...". I tried upgrading to the latest PB5.0.04 maint release -
Does Powerb...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. ...Word 2010 OLE automation
I user Delphi 2010 with Office 2010.
When i try to open word document from my delphi application
it open the file but the word stayes minimized.
this is my code:
procedure OpenOleWordFile(Var MsWord:Variant;WordFileName:String);
MsWord := GetActiveOleObject('Word.Application');
MsWord := CreateOleObject('Word.Application');
ShowMessage('Error ....cannot open WORD');
MsWord.Application.WindowState := 1...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...URGENT ! POWERBUILDER + WORD + OLE
I need to change, from my PowerBuilder application, the print
specification of a Word Document before its printing (which paper to use,
scale, where to find the paper in the printer, ...)
Is it possible with OLE or DDE ?
How to do it ?
Thanks for all !!!
Use INI file settings, i.e. specify 'tray' and 'paper type' to use.
Note: It will be hardware dependant
> Hello all,
> I need to change, from my PowerBuilder application, the print
> specification of a Word Document before its printing (which paper to use,
>...Excel and/or Word OLE Automation
I found out that the client machines that will be running my app will
have office 95 on them. So I decided to use the spell checking example
that Powersoft provied to work with Excel, instead of using the VS ocx.
I found out that I handed in one set of problems for yet another set of
I took the example from PS and changed the mle to be dw column. The
text in the column has hard returns in it, so when I set the text in
excel I get | where the hard returns are. This is only a minor problem,
that I could live with. However the big problem is that one of two
things happen...Using Ms Word OLE in Powerbuilder??
I'v recently enherited a PowerBuilder app that strips data out of DB2 and
inserts it into A Word mail/merge document for printing using OLE. It was
built for use with Word 5.0. We've gone to Office 97. It no longer works
(same old story).
Here is the offending code:
It stops on the first line and the error message says that the "EditGoTo
property was not found"
Can someone stear ...PowerBuilder 10.2 with Word OLE
I am having a crazy hard time trying to figure out what is
wrong with this PowerBuilder interaction with Microsoft Word
2003. After upgrading from Windows 2000 and Office 2000 to
Windows XP and Office 2003, document corruption seems to
occur (4 bytes of garbage scattered throughout the document
file). Both methods of accessing the OLE/Word DOM are being
used. One with the ActiveX control on a form and the other
using the CREATE OLEObject. Word is being used to view,
edit, print, find and replace text, and render PDF
documents; no mail merges or nothing complicated like that.