OO-Snippets: accessing user-fields

Commons

Keywordsuser-fields, setting value of userfield
LanguageOOBasic
ApplicationWriter
AuthorsTom Schindl (initial)
Supported Versions
Supported OS
Question Setting using and changing contents of fields
Answer

Code-Snippet-Listing (snippet-source)

Dim xNamedFieldMasters As Object
Dim xEnumeratedFields As Object
    
xNamedFieldMasters = ThisComponent.getTextFieldMasters()
xEnumeratedFields  = ThisComponent.getTextFields()

xNamedFieldMasters.getByName("com.sun.star.text.FieldMaster.User.test").Content="SUPER"
xNamedFieldMasters.getByName("com.sun.star.text.FieldMaster.User.test2").Content="SUPER2"

xEnumeratedFields.refresh() 

Changelog

DateUserModification
2004-12-04tomsontomInitial version

and