von F3K Total » Di, 31.07.2012 19:23
Hallo Thomas,
ich habe da mal was vorbereitet.
Wenn Du dieses Makro einer Schaltfläche (Button) auf "Tabelle1" unter "Aktion ausführen" zuordnest, und das Seitenformat Standard (Default) verwendest, funktioniert es.
Code: Alles auswählen
Sub setDocPrintSettings(event)
odoc = Thiscomponent
omodel = event.source.model
oStyle = odoc.StyleFamilies.PageStyles.getByName("Default")
if omodel.label = "Grafiken drucken" then
omodel.label = "Grafiken nicht drucken"
omodel.BackgroundColor = RGB(255,0,0)
oStyle.PrintObjects = false
else
omodel.label = "Grafiken drucken"
omodel.BackgroundColor = RGB(0,255,0)
oStyle.PrintObjects = true
endif
end sub
Gruß R
Hallo Thomas,
ich habe da mal was vorbereitet.
Wenn Du dieses Makro einer Schaltfläche (Button) auf "Tabelle1" unter "Aktion ausführen" zuordnest, und das Seitenformat Standard (Default) verwendest, funktioniert es.
[code]Sub setDocPrintSettings(event)
odoc = Thiscomponent
omodel = event.source.model
oStyle = odoc.StyleFamilies.PageStyles.getByName("Default")
if omodel.label = "Grafiken drucken" then
omodel.label = "Grafiken nicht drucken"
omodel.BackgroundColor = RGB(255,0,0)
oStyle.PrintObjects = false
else
omodel.label = "Grafiken drucken"
omodel.BackgroundColor = RGB(0,255,0)
oStyle.PrintObjects = true
endif
end sub[/code]
Gruß R