OpenOffice.org: Replacing dingbats
| geekI _really_ should have blogged this when I first wrote it. That would’ve saved me time writing it again!
Sub ReplaceDingbats(optional doc) oDocument = IIf(IsMissing(doc), ThisComponent, doc) oSearchDesc = oDocument.createSearchDescriptor for i = 1 to 9 oSearchDesc.searchString = "(;; )?\(" + i + "\)" oSearchDesc.searchRegularExpression = true mFound = oDocument.findFirst(oSearchDesc) do while not isNull(mFound) mFound.string = chr(&HF08B + i) mFound.CharFontName = "Wingdings" mFound = oDocument.findNext(mFound.End, oSearchDesc) loop next i End Sub
It’s a macro for OpenOffice.org – replaces the widgets I use in formatting the book chapter…
2 comments
Knusper
2008-08-05T21:03:56ZYou use emacs, but write your book with Open Office... I don't get it. Have you ever tried Auctex?
Sacha Chua
2008-08-05T21:27:45ZI use Org in Emacs to draft everything, then I export it as HTML, then I open up the HTML and copy it into OpenOffice.org so that I can format it according to the publisher's template, making liberal use of Org and OpenOffice.org tweaks to make my life easier. =) Does that make sense now? Wouldn't do it if it didn't need formatting.
I used to write my lab reports using auctex. That was quite fun, actually.