OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Just a problem with a little Inster-Text-Macro for OpenMath

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Lachsen
Newbie
Newbie


Joined: 27 Apr 2006
Posts: 1

PostPosted: Thu Apr 27, 2006 10:44 am    Post subject: Just a problem with a little Inster-Text-Macro for OpenMath Reply with quote

I want to write a little Macro, which does nothing more than inserting the text "drarrow" at the current Cursor position - in OpenMath

I'm completly new to all this, so I read some documentations and tutorials. In one I found following script:

ssub DarausFolgt
Dim oDocument As Object
Dim oText As Object
Dim oViewCursor As Object
Dim oTextCursor As Object

oDocument = ThisComponent
oText = oDocument.Text
oViewCursor = oDocument.CurrentController.getViewCursor()
oTextCursor = oText.createTextCursorByRange(oViewCursor.getStart())

oText.insertString(oTextCursor, "drarrow", FALSE)
end sub

I tried it, but it didn't work out.
Instead the warning "Property or method not found" was displayed on this line:
oText = oDocument.Text

So it seems, that the OpenMath Dokument doesn't have any "Text"-Object.

So, how can I insert text in OpenMath with a macro?

Thanks for any help. ^^

Lachsen
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group