Jump to content

Com Object Issue Re: Certain Methods


Recommended Posts

Can someone please tell me if using the following MS Word COM method is possible, and if so, how one would go about using it?

I'm trying to create and fill in a Word document without having to use the "Send" command. It would be much cleaner to use this method:

.Activedocument.Content.InsertAfter Text:="The end."

...but unfortunately AutoIt doesn't like the space between "InsertAfter" and "Text," which causes it to assume the text after the space is a parameter.

Is it possible, using AutoIt, to use COM methods like this in a script? How would I code it?

Thanks in advance.

(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]
Link to comment
Share on other sites

Never mind! I answered my own question. Here's the solution:

.Activedocument.Content.InsertAfter("The End")
(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...