I need a Word macro (VB for Applications)written that reads through a series of folders containing Word documents and changes one of the document properties in each of the Word documents and then changes the document's name. There is a text file in each folder that contains the value that the property needs to be set to. The macro will need to be written within 24 hours of the project being assigned.
[url removed, login to view] the macro in a Word document compatible with Word 2003.
2. Create a constant (that I can edit) for the root folder to be searched (eg c:mydocs).
3. When run, search each subfolder of the folder specified in #2.
4. In each subfolder will be a text file that needs to be read. I will attach a sample file to this project.
5. Read the text file. Each line corresponds to a Word doc. Open the Word doc and set the 'Title' property of that doc to the last field on the line.
6. The extension of the document name is currently UPPERCASE .DOC. Rename this to lowercase .doc
7. Repeat until each document in the text file has been updated then move on to the next folder.
7. Provide a simple screen showing the user the current folder/document being processed.
8. Include basic error handling code so that user knows which folder/document is causing problem (if there is a problem.