Macro OpenOffice para formatar margem do documento

Sub Margins( )
 Dim oDoc
 Dim oPageStyles
 Dim oStyle
 Dim oViewCursor
 Dim oPageStyleName
 Dim fromleft%, fromtop%, fromright%, frombottom% 

 oDoc = ThisComponent
 oViewCursor = oDoc.CurrentController.getViewCursor() 

 oPageStyleName = oViewCursor.PageStyleName
 oPageStyles = oDoc.StyleFamilies.getByName("PageStyles")
 oStyle  = oPageStyles.getByName(oPageStyleName) 

 'fromleft, fromtop, fromright, frombottom = whatever you want
 oStyle.LeftMargin = fromleft
 oStyle.TopMargin = fromtop
 oStyle.RightMargin = fromright
 oStyle.BottomMargin = frombottom 

End Su


Fonte: https://groups.google.com/group/it-alt.comp.software.openoffice/browse_thread/thread/6cbfa3ef686aa5dc/57db616a20aac984?hl=it&pli=1#57db616a20aac984

Comentários

Postagens mais visitadas deste blog

SCP com porta diferente

PfSense, Intel NIC e Velocidades de carregamento lento

Formulários do Incra para download