von writeme » Mi, 29.01.2014 17:03
Halli Hallo.. nächstes Problem..
Wie kann ich ein Autotextbaustein in einem ganz speziellen Textfeld (Textfeld1) einfügen per Makro ?
Das einfügen des Bausteins habe ich bissher folgendermaßen gelöst...
Code: Alles auswählen
sub Meinfugen
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Group"
args1(0).Value = "mytexts*1"
dispatcher.executeDispatch(document, ".uno:SetActGlossaryGroup", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Group"
args2(0).Value = "mytexts*1"
dispatcher.executeDispatch(document, ".uno:SetActGlossaryGroup", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Group"
args3(0).Value = "mytexts*1"
dispatcher.executeDispatch(document, ".uno:SetActGlossaryGroup", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(1) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Group"
args4(0).Value = "mytexts*1"
args4(1).Name = "ShortName"
args4(1).Value = "M"
dispatcher.executeDispatch(document, ".uno:InsertGlossary", "", 0, args4())
end sub
Moderation:
Zur Darstellung von Programmcode sind in der Forums-Software die [code]…[/code] Tags vorgesehen. Diese habe ich für dich gesetzt.
lorbass, Moderator
Halli Hallo.. nächstes Problem..
Wie kann ich ein Autotextbaustein in einem ganz speziellen Textfeld (Textfeld1) einfügen per Makro ?
Das einfügen des Bausteins habe ich bissher folgendermaßen gelöst...
[code]sub Meinfugen
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Group"
args1(0).Value = "mytexts*1"
dispatcher.executeDispatch(document, ".uno:SetActGlossaryGroup", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Group"
args2(0).Value = "mytexts*1"
dispatcher.executeDispatch(document, ".uno:SetActGlossaryGroup", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Group"
args3(0).Value = "mytexts*1"
dispatcher.executeDispatch(document, ".uno:SetActGlossaryGroup", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(1) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Group"
args4(0).Value = "mytexts*1"
args4(1).Name = "ShortName"
args4(1).Value = "M"
dispatcher.executeDispatch(document, ".uno:InsertGlossary", "", 0, args4())
end sub[/code]
[color=#00AA00][b]Moderation:[/b]
Zur Darstellung von Programmcode sind in der Forums-Software die [code]…[/code] Tags vorgesehen. Diese habe ich für dich gesetzt.
lorbass, Moderator[/color]