news.gmane.org wrote:

I've tried searching the mailing list but have been unable to find anything that specifically applies.

Can someone remember off the top of their head how to make a macro modify the text inside a variable.

Basically, I have this template document with fields with names like 'client', 'location', 'farm #', and 'distance'. I need to be able to open the document, and do a macro that takes text from the clipboard and modifies the particular variables.

I can make the text on the clipboard any format I want, like

client: Jo Smith
location: Seattle
farm #: 1123

because it will be coming out of another spreadsheet program.

Can anyone drop me a quick line on how to do the above? Thanks!

-Suthern

Let me restate your problem.

You want to

read data from the clipboard
parse the data from the clipboard
store the data in text fields

Download my free macro document, look at the section titled "Getting the content-type of the Clipboard". Depending on the text field type, you should be able to get the text fields with examples from the document as well.

Worst case, use this as a starting point

oEnum = ThisComponent.getTextFields().createEnumeration()

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to