PDA

View Full Version : Creating blog functionality in Word 2003



mediaeval
10-30-2012, 02:31 AM
I’m very experienced with Excel VBA and Legacy VB6, but don’t have much experience in Word VBA. I have a Word document which resembles a diary – an entry for most days. There may be several paragraphs associated with each day. It’s essentially a rudimentary blog in Word 2003, with tags at the end of each paragraph. I don’t have access to blogging software here at work, hence I’m reduced to creating my own one J. At the end of each paragraph is a set of square brackets containing the tags for each day, separated by commas. Here’s an example of what I have:



October 10, 2012
I looked at the value of STATUS_PUP for those cases whose value was later set to B. The majority of them are X1s. [Exposures, DCS, ESPM, Status_B]
Updated the movements flow chart [flow chart]

October 14, 2012
Estimate the writing involved in the documents. [report, project plan]


What I want to do is this:
(a) Search through the entire document, isolating the text within each set of square brackets, and copying it to a separate document. I’d like to then summarise those entries, and return a count of how often each one occurs.
(b) Allow the user (which will only ever be me) to select a single tag, click on a macro button perhaps, and have all paragraphs associated with that tag word copied to a new document. In a blog, a user would click on a hyperlink of a tag, and a fresh screen would appear in their browser, highlighting all occurrences of that tag. If I could do that as an alternative, that would also be great. I know I’m describing standard blog functionality, which I believe is standard in Word 2007, but not in Word 2003, which I’m stuck with. But at least I have the fun of writing some interesting code. J