View Single Post
 
Old 09-29-2013, 06:20 PM
BobBridges's Avatar
BobBridges BobBridges is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

My general process would be something like this:

0) In your Excel program, a) start a new worksheet to contain the list you're creating, and b) fire up the Word application.

1a) If your Excel document already has the list of Word documents (path and file name), then your VBA program just to go down the list one at a time. For each Word document in the list, execute steps 2 and 3.

1b) But if you expect your program to create the list of Word documents from scratch, then you must have some way of deciding which Word documents should go on the list and which should not. So you'll have your program look up all the Word documents in a certain folder (or folders), picking out those whose file name fits a certain pattern (having a date in the name, at least) and ignoring the rest. Maybe other criteria will go into that decision too. For each Word document that makes the cut, execute steps 2 and 3.

2) Add the Word document's date to your list.

3) Use the Word Application object to open the current Word document. Pick out the section that has the citations in it. Pick out the desired information from each citation (name of publication and title of article, I think you said) and list it with the Word document's date.

The part that has to happen in Word is at the part about opening the Word document, finding the citations section at the beginning and picking out a long character string that represents all the citations. You may want to use Word also to pick out each citation as a separate paragraph; I probably would.

I don't use VBA/Word much, but I have done a little. If you need help with that, or with parts of the rest of the program, I would ask in the Word forum first, but if they're no help there (I'm not predicting; I have no idea), feel free to ask here next. In the latter case, though, do it in the Excel-programming forum; you'll probably have better luck there.
Reply With Quote