Running Word Macro as part of post-build script?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Running Word Macro as part of post-build script?

Post by doc_guy »

You know how when you generate text that has autonumber formatting (like Note: inserted before a note paragraph)? Word doesn't format it correctly. Instead it just outputs {b}Note: {/b}. Fine. I can create a macro that I can run very quickly to do a find and replace. I've got that part working. But what I'd like to do now is to make this macro run as part of the post-build script that I can set in the target. Any thoughts on how to do this?
Paul Pehrson
My Blog

Image
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Running Word Macro as part of post-build script?

Post by Nita Beck »

Paul, you can fix this right in Flare.

Instead of using the "inline" codes such as {b} {/b} to format the auto-number, use the mc-auto-number-class attribute to call a span class. Works beautifully in all outputs.

Here's an example from one of my stylesheets:

Code: Select all

p.Note
{
	mc-auto-number-format: 'NOTE: ';
	mc-auto-number-class: MinorNotice;
}

span.MinorNotice
{
	font-weight: bold;
}

p.Important
{
	mc-auto-number-format: 'IMPORTANT! ';
	mc-auto-number-class: MajorNotice;
}

span.MajorNotice
{
	font-weight: bold;
	color: red;
}
Cheers!
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Feebeegeebee
Sr. Propeller Head
Posts: 213
Joined: Wed Aug 08, 2012 8:38 am
Location: UK

Re: Running Word Macro as part of post-build script?

Post by Feebeegeebee »

Thanks Nita! :D
I encountered this exact same issue and was about to embark on finding a solution to it.
You've saved me a whole lot of time and effort!
I have adapted your example and it works just fine!
Many thanks for posting.
Regards,
Feebeegeebee
-----------------------------------------------------
Using Flare 2022 on Windows 11 (64-bit)
-----------------------------------------------------
RStreets
Propeller Head
Posts: 63
Joined: Wed Apr 19, 2017 8:37 am
Location: Cambridge, UK

Re: Running Word Macro as part of post-build script?

Post by RStreets »

Another thank you here too!

Such a useful solution.

Rae
Rae Streets (Flare user since 2017, now on Flare 2023; Central user from 2020)
Post Reply