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.

Running Word Macro as part of post-build script?

Postby doc_guy on Mon Feb 24, 2020 11:27 pm

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
User avatar
doc_guy
Propellus Maximus
 
Posts: 1959
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West

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

Postby Nita Beck on Tue Feb 25, 2020 5:00 am

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
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3374
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

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

Postby Feebeegeebee on Fri Feb 28, 2020 4:55 am

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 2020 on Windows 10 (64-bit)
------------------------------------------------------
Feebeegeebee
Sr. Propeller Head
 
Posts: 182
Joined: Wed Aug 08, 2012 8:38 am
Location: UK

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

Postby RStreets on Mon Mar 02, 2020 7:17 am

Another thank you here too!

Such a useful solution.

Rae
Rae Streets (Flare user since 2017, now on Flare 2020; Central user from 2020)
RStreets
Propeller Head
 
Posts: 23
Joined: Wed Apr 19, 2017 8:37 am
Location: Cambridge, UK


Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 8 guests