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 ...
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 and MS WordIn 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 take...
Delphi OLE automation inside a windows serviceHello: I have a simple question.
I did a program (a service) with a timer: every 10 minutes, this service
goes to a database, take records and sends informative mail to customers
using Outlook with OLE automation.
This program, as standalone program, works fine.
But this program, converted as service, call Outlook and the service stop.
Any ideas?
The service code:
procedure TDistriMail.ServiceExecute(Sender: TService); // the OnExecute
service
begin
Timer1.Enabled := True;
while not Terminated do
ServiceThread.ProcessRequests(True);// wait for termination
...
Word ole: How to close MS wordI 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 =
...
WordPerfect: OLE automation through OLE controlOK, 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
...
Word OLE automationWould 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.
...
OLE with MS WordHello 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
...
Word OLE automationI 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 and MS WordHello,
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 ...
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. ...
OLE Excel with Delphi 7I am having troubles opening an Excel file with Delphi 7. I think I really need some Delphi specific examples or some help files.
I am trying to follow examples in this forum and also seeing there is limited information in the help files.
For example I try the following -- which seems to be working for others in the forum, I am assuming with later versions of Delphi
Xapp1.Workbooks.open('...filename...'); //where file name is a valid name
This gives me an error "Not enough actual parameters",
One example I see has me try this:
Xapp1.Workbooks.Open(...
OLE (MS-Word) ControlHi 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...