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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Word Macro build.

Status
Not open for further replies.

PanfTeach

Programmer
Nov 25, 2008
6
US
Hey guys, I am a bit rusty after a career change, so I am looking for some assistance with this.
What I am trying to do is in Word 2007 they have a Compare Feature, that I am trying to use, to compare around 20-25 documents at a time. So the way it works is, you have 1 main KEY document, that needs to be compared to 25 other documents. The problem is, each time you compare a document, Word makes you go back and choose both documents each time, which is a real pain. So what I would like to do is have a Macro, or something set up, that allows the key document to be chosen every time, and then allows me to just chose the document that needs fixing. I teach, and have tons of papers to grade, and I would like to use the compare function, however, right now it just isnt working correctly for me. If you need more info please let me know.
 
Hi,

"right now it just isnt working correctly for me"

"it" is WHAT that is not working for you? Please explain in detail, WHAT it is that you are doing to compare documents and WHAT it is that is not working.

My shoot-from-the-hip suggestion is to establish a process that works for you to compare. Then use your macro recorder to record the steps in that process. Then post back in Forum707, to get help with specific code customization problems that you might have.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Skip,
Thanks for the quick response. Here is what I am trying to do in more detail. You have a word document that is named (for example), "key1.doc". Your students hand in 20 papers, that need to be graded via folders that I save on my flash drive. What I do is, I open Word 2007, and click the Compare option at the top. This allows me to compare the "key1.doc" to any other document that I chose. And it makes the corrections, and I put a grade on the paper, with my Tablet.

The problem is the procedure above is just too time consuming, because Word does not allow you to just keep that one document, 'key1.doc' as the main compare file. It makes you go through the process everytime of selecting it, and then you have to also select the file you want to compare. It takes too much time.

The solution that I have in my mind, is to make a macro, that by default sticks in 'key1.doc' into the Compare option, and then pops up a folder asking me to find the next document to compare. This would save a bunch of time.

I then hope to grow this, to possibly allow me to select all 20 documents at once, and compare them 1 by 1 with the macro.

I tried to build the Macro, through Word on my own, however, there is no way for me to stop it, on the open folder, without writing code. and it has been a long time since i did that.
 
Here is an example of the Macro I have gotten

ActiveDocument.Merge FileName:= _
"F:\Grade\214-7\214-7-3\MLA Reports\packet 1\Report 3.doc", MergeTarget:= _
wdMergeTargetSelected, DetectFormatChanges:=True, UseFormattingFrom:= _
wdFormattingFromPrompt, AddToRecentFiles:=False



Instead of the macro, leading to a specific file, I want it to lead to a folder, where I can chose which file to compare.
 
This forum does not discuss VBA code.

Please post your question and VBA recorded code in Forum707, as I formerly asked you to do.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top