topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 5:31 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Macro to replace formatting with html code? Or other process or program...  (Read 5675 times)

m_s

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 433
    • View Profile
    • Donate to Member
In my new job I'm responsible for updating several hundred inter- and intranet pages.  I work with probably a hundred authors, most of whom prepare their text in MS Word, which means their documents are littered with silliness like 'smart quotes' that our CMS doesn't recognize - so I have lots of ?s littering any text I cut and paste.  That's not a major problem since I can just save as plain text; I wish I could get them all to work in plain text, but that's not an option given most of their level of expertise.  What would be really helpful is if I could record a macro that would search-and-replace formatting within their documents with the correct html tags - so, rather than a 'bolded' word, would end up with 'bolded' with the correct html prefix and suffix (I tried to enter that here, but every time I do this clever bulletin board bolds the word!).  I can probably work this out myself (although I am having some difficulty working out how to get Word to find a variable string of formatted characters and replace that string removing formatting and adding code), but I imagine this is something others have also had to do, so can anyone advise me on an easy way of doing this?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
there are probably several tools that will let you set up such search+replace projects.. maybe some specific for ms word..
you might also check out this tool from one of the people who entered the BCB contest:
http://www.texttransformer.com/

im curious to hear that you go with in the end, and what others recommend.  keep us informed!

m_s

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 433
    • View Profile
    • Donate to Member
No other replies?  I thought one of the AHK evangelists would have leapt on this one!   :)   I've figured out a laborious macro involving various searches and replaces - if you search for bolded £5.67, Word treats this as three words! '£', '5', and '56' - and then you have to do the '.' separately.  But now it seems my work has macros disabled universally!  :(  Back to the drawing board.

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
    • View Profile
    • Donate to Member
If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,205
    • View Profile
    • Donate to Member