Jump to content
Sign in to follow this  
mark2004

Syntax problem with Word Objects

Recommended Posts

mark2004

Hi All.

I'm trying to work with the Microsoft Word object model and am having trouble with the following statement:

$oWordApp.Selection.TypeText Text:="Hello World"

This syntax is apparently wrong in Autoit. I have been figuring out the Word Object Model by recording macros in Word and then

inspecting the macro with the visual basic editor. Other object expressions have worked fine in Autoit but this one is spitting

out an error during compile.

Any ideas?

Mark

Share this post


Link to post
Share on other sites
Jos

Have you seen that there are a whole bunch of standard WORD UDF's available you can use and/or learn from?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
mark2004

Hi Jos.

Thanks. Yes I am aware that the WORD UDF's are quite extensive. I am working with Autoit version 3.2.4.9 and

cannot upgrade since my current script does not run right in the latest versions. So, I uninstalled and went back to

the older version. Upgrading my code to work with the latest version is on my todo list.

So, I am currently limited to the WORD UDF's in the older version, and I haven't seen anything that would answer

my question....

Have you seen that there are a whole bunch of standard WORD UDF's available you can use and/or learn from?

Jos

Share this post


Link to post
Share on other sites
mark2004

O.K. After some more random experimentation, I found the following syntax worked:

$oWordApp.Selection.TypeText("Hello World")

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.