Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating a file using a Word Macro

Status
Not open for further replies.

DavidPooley

Technical User
May 14, 2008
3
GB
Dear All,

I am investigating the feasibility of writing a Word Macro to extract information from a "Word" file so that it is available to another programming language. I have written a simple Macro to insert a "[?]" symbol, and designated it as a hyperlink. I can use the "find and replace" function to remove this from the final version (I need two versions – one with the inserted hyperlinks and one without mark up).

What I want to do is to replace the "[?]" symbol with approximately 30 different symbol types which in turn relate to different features in the text – that should be straight forward. I want the Macro to count the occurrences of each symbol type e.g. [*] , [!] etc in the document. I want this information to be available to another programming language such as "C", so the Macro needs to generate a file of some description. This is so that I can do a statistical analysis of my inserted symbols in any given Word document. I will need to remove all occurrences of my symbols from the final version. I also need to output a word count to my file, generated by the Macro.

I am not sure if it's possible to do this using a Word Macro and would be grateful for any advice your group can provide. (I have Word 2007)

Thanks

David
 
so the Macro needs to generate a file of some description. "

Word can write a plain text file that could be used by anything that can read a plain text file.

faq219-2884

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top