Solved

Automation Servers

Posted on 2000-02-16
5
193 Views
Last Modified: 2012-05-04
How does one determine the methods available from a given automation server interface.  For example many code examples have the following simple app:

var
  Word: Variant;
begin
  Word := CreateOleObject('Word.Basic');
  Word.FileNew('Normal');
  Word.Insert('This is the first line'#13);
  Word.Insert('This is the second line'#13);
  Word.FileSaveAs('c:\temp\test.txt', 3);

What I want to know is how do I determine that methods an automation server interface has ( eg Insert() ) in the example above? This is easy enough to do with ActiveX but Im at a loss with Automation Servers.  Then again I could have missed something basic.
0
Comment
Question by:twalsh
5 Comments
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2530037
Listening
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2530312
Hi,

I don't know if there's an simpler way but I usually look up the Wordbasic help from Word (in this case) to learn what method calls are allowed. For other automation servers a similar help should be available, otherwise nobody could write scripts for them.

Ciao, Mike
0
 
LVL 2

Accepted Solution

by:
florisb earned 50 total points
ID: 2530450
To do:

Not Wordbasic, but OLE / COM / Automation:

Select Project | Import Type Library | Microsoft Word (9.0?).... | create unit.

Now you have a unit with all possible methods you can call, you can find Insert here too.

now define a global:

FWord : _application

and add ComObj to your uses list.

so you can:

FWord := CoApplication.Create;
et cetera (see previous questions on this subject).

Trying to automate something? Do it in Word and record a macro; then translate the macro to Delphi by checking the imported unit.

Floris.


0
 

Author Comment

by:twalsh
ID: 2540737
Thankyou, I will follow up on this.  
0
 
LVL 2

Expert Comment

by:florisb
ID: 2541555
thanks, if you have more specific questions about Word...

Good luck,
Floris.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 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