V. Menzel wrote:
Hallo,
ich habe das Problem, dass ich eine mit Benutzerdefinierten Zahlenformaten
definierte Tabelle in meinem Text habe. leider lässt sich die Formatierung
nicht speichern, so dass ich bei einer neuengabe die Formatierung von Hand
wieder ändern muss.
Für einen Tipp wäre ich sehr dankbar.
Gruss
Volker
Download my free macro document (http://www.pitonyak.org/AndrewMacro.odt).
Read the section titled "View Supported Number Format Styles"
*Sub enumFormats()*
*'Author : Laurent Godard*
*'e-mail : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> *
*'Modified : Andrew Pitonyak*
*Dim oText*
*Dim vFormats, vFormat*
*Dim vTextCursor, vViewCursor*
*Dim iMax As Integer, i As Integer*
*Dim s$*
*Dim PrevChaine$, Chaine$*
*Dim aLocale As New com.sun.star.lang.Locale*
*vFormats = ThisComponent.getNumberFormats()*
*RunSimpleObjectBrowser(vFormats)*
*oText = ThisComponent.Text*
*vViewCursor = ThisComponent.CurrentController.getViewCursor()*
*vTextCursor = oText.createTextCursorByRange(vViewCursor.getStart())*
*Dim v*
*v = vFormats.queryKeys(com.sun.star.util.NumberFormat.ALL, aLocale, False)*
*For i = LBound(v) To UBound(v)*
*vFormat=vFormats.getbykey(v(i))*
*chaine=VFormat.FormatString*
*If Chaine<>Prevchaine Then*
*PrevChaine=Chaine*
*chaine=CStr(v(i)) & CHR$(9) & CHR$(9) & chaine & CHR$(10)*
*oText.insertString(vTextCursor, Chaine, FALSE)*
*End If*
*Next*
*MsgBox "Finished"*
*End Sub*
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]