6096 comments
2357 subscribers
6253 on Twitter
Subscribe! Feed reader E-mail

OpenOffice.org: Replacing dingbats

I _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…

Short URL: http://sachachua.com/blog/p/5035
  • http://knusper.says.it Knusper

    You use emacs, but write your book with Open Office… I don’t get it. Have you ever tried Auctex?

  • http://sachachua.com Sacha Chua

    I 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.

On This Day...

  • 2012: Weekly review: Week ending August 3, 2012 — Lots of tech changes! Getting the hang of using my tablet. Upgraded to a new cellphone with a data plan. [...]
  • 2011: Drupal and JQuery 1.5: Fixing the JSON encoding of ampersands — Drupal 6′s drupal_json method encodes ampersands incorrectly for JQuery 1.5, causing the rather cryptic error: Uncaught Syntax error, unrecognized expression: [...]
  • 2010: Success and blogging — What’s success when you’re writing a personal blog–not a niche blog which you want to make money from through [...]
  • 2008: Finding something worth talking about — "I don’t know what I’d talk about," people often tell me when I encourage them to think of topics for [...]
  • 2008: Emacs and Gnus: zomg, new chapter out the door! — So I _finally_ pulled everything together and got my Gnus chapter out the door. Hooray, hooray, hooray! Reading Mail with Gnus [...]
  • 2008: Emacs: Caps lock as M-x — Inspired by Lennart Borgman’s recent post on help.gnu.emacs about binding Caps Lock to M-x on Microsoft Windows, I set my [...]
  • 2007: No plans yet — My birthday’s coming up next week and I still don’t have any plans. Somehow, that realization makes me feel lonely. Is this [...]
  • 2006: Month in review — Check out my May, June, July, and August indices, too. =)
  • 2006: CookOrDie: Danger, Will Robinson! — Uh oh. I now know how to bake brownies from scratch, and I can make them as moist and chocolatey as I [...]
  • 2006: Social Tech Brewing: It’s all about choices — (I think about this a fair bit even as a 22-year-old because I want to know my values, and reflecting on [...]
  • 2006: Social Tech Brewing: Women in Technology — Today’s Social Tech Brewing event about Women in Technology gave me much to think about. I’ll blog a bit more about [...]
  • 2005: Chicken adobo results — I microwaved the chicken adobo for another minute and a half just to feel slightly better about it, and fried it [...]
  • 2005: On intelligence and wisdom — On mensaphilopen, Alistair Israel said: The smart ones realize that this it isn’t worth living in this country, and seek their fortune [...]
  • 2005: Finally! Internet! — I had been grumbling about it for all of five minutes as I fiddled about with various settings, finding it completely [...]
  • 2003: FOAF — Friend-of-a-friend descriptions are up at http://sacha.free.net.ph/notebook/foaf.rdf
  • 2003: Invitations — - Berris, Dean Michael – sent - Carreon, Mario – sent - lastname, Aimee – sent c/o Mario - Cimafranca, Dominique – sent - [...]
  • 2003: Women and technical courses — http://www-personal.si.umich.edu/~rfrost/courses/Women+Tech/readings/Margolis.html Link from JM Ibanez
  • 2003: Java — Calen is referring to the “Rethinking the Java Curriculum” article: http://www.onjava.com/pub/a/onjava/2002/08/21/javaxp.html With some interesting follow-up commentary here: http://fishbowl.pastiche.org/archives/000454.html
  • 2003: Enye (n with tilde) — - http://marc.free.net.ph:80/message/19991216.121601.49226c7e.html - http://marc.free.net.ph:80/message/20011213.093356.e7625d7b.html - http://marc.free.net.ph:80/message/20011213.180210.24306ae0.html - http://marc.free.net.ph:80/message/20011214.010850.5f9e91ed.html

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging

Free sample!