Word VBA >> Compare and Merge Documents

by Howard Kaikow » Tue, 27 Jul 2004 21:12:04 GMT

When I do a Tools | Compare and Merge Documents via the GUI in Word 2003,
the default is to always check "My Documents".

I'd prefer that the current directory be the default.
So, I modified AutoOpen to set the current directory and the current drive
appropriately.
However, "My Documents" still is the default.

Any workaround?

--
http://www.standards.com/; See Howard Kaikow's web site.




Word VBA >> Compare and Merge Documents

by Chad DeMeyer » Wed, 28 Jul 2004 00:38:04 GMT


Howard,

Try changing the default file location for Documents (Tools>Options>File
Locations). Or in VBA, Options.DefaultFilePath(wdDocumentsPath).

Regards,
Chad









Word VBA >> Compare and Merge Documents

by Howard Kaikow » Wed, 28 Jul 2004 01:59:52 GMT

That would change the default Documents directory.
I'd rather not change that, tho there might not be an alternative.

--
http://www.standards.com/ ; See Howard Kaikow's web site.




2003,
drive




Compare and Merge Documents

by Chad DeMeyer » Wed, 28 Jul 2004 04:43:15 GMT

Howard,

I don't think you can affect the directory for the doc compare any other
way. But you could replace the existing Word command with something like
this:

Sub ToolsCompareVersions()
'
' ToolsCompareVersions Macro
' Compares the active document with an earlier version
'
Dim sLoc As String
sLoc = Options.DefaultFilePath(wdDocumentsPath)
Options.DefaultFilePath(wdDocumentsPath) = <your path here>

Dialogs(wdDialogToolsCompareDocuments).Show

Options.DefaultFilePath(wdDocumentsPath) = sLoc
End Sub

Hope that helps.
Regards,
Chad












Compare and Merge Documents

by Howard Kaikow » Wed, 28 Jul 2004 16:48:49 GMT

Yes, but I do not want to override a Word command in his case.
So I guess I'm stuck.

--
http://www.standards.com/ ; See Howard Kaikow's web site.






(Tools>Options>File






Similar Threads

1. "Compare and Merge Documents" issues with images

Setup: Microsoft Office Word 2003 (11.6502.6408) SP1

Scenario 1: 
1. Created a document with an image (any format: JPEG, GIF, BMP, PNG, etc.) 
and saved it as Document1_1.doc
2. Resized image and saved document with name Document1_2. doc. 
3. Closed all instances of Word
4. Opened Document1_1.doc. Selected Tools\Compare and Merge Documents and 
performed merge with Document1_2. doc. 

Problem 1: No image revisions created in the merged document.
Note: No revisions are also created for changes in other properties, such as 
brightness, contrast, transparency, etc.

Scenario 2:
1. Made a copy of Document1_1.doc and renamed it to Document2_1.doc.
1. Opened Document2_1.doc and selected image and replaced it with another 
image.
2. Saved updated document with the name Document2_2.doc
3. Closed all instances of Word
4. Opened Document2_1.doc. Selected Tools\Compare and Merge Documents and 
performed merge with Document2_2. doc. 

Problem 2: No image revisions created in the merged document.

Scenario 3:
1. Created a document with 3 images that follow one another (any format: 
JPEG, GIF, BMP, PNG, etc.) and saved it as Document3_1.doc
2. Deleted second image.
3. Saved updated document with the name Document2_2.doc.
4. Closed all instances of Word
5. Opened Document3_1.doc. Selected Tools\Compare and Merge Documents and 
performed merge with Document3_2. doc. 
6. Save document in WordML format with the name Document3_3.xml

Problem 3: Delete revision contains third picture inside. It should be the 
second image. Inspect saved WordML file. Word ML content looks strange.
Note: Try this with images that follow one another (image that follow one 
another appear next to each other horizontally) and with images that are 
separated with paragraphs (image that follow one another appear next to each 
other vertically). Result is the same.


Question: Did anyone run across the described issues? Is there a quick 
work-around? I do the merge operation programatically through the Word 
Interop assemblies on WordML files. I need it to track changes in a document.

Ruslan

2. compare and merge documents - Word Document management

3. Word Compare and Merge Document Function

The Compare and Merge Document function in word is almost useless.  I create 
a wide variety of documents for the Navy for various systems being updated or 
developed.  My Compare and Merge requirement is to to compare a new version 
of the document with an old version of the document and overlay the new 
information on to the old information.  A simple AND or OR function is not 
going to be useful.

My suggestion is to design the Compare and Merge Document function so that: 
1. The function starts by matching up the paragraph or section headings of 
the opened doc's headings to fit the selected filename doc's headings and 
renumbering the opened doc's headings to match or fit within the selected 
file's headings.
2. The opened document is has priority over the selected file to compare and 
merge with for test replacement.  The goal to achieve is to compare and merge 
the latest changes in order to  update the existing document.

Currently the compare and merge just seems to do an AND function.  It 
deletes document portions where there is no text to compare and it simple 
combines the latest added words to the old text.

Perhaps a way to achieve more versatility is to give the user an option list 
of AND, OR, NOR, Exclusive AND, etc. or possibly a sequential function 
selection of up to three.  Say first to OR everything and save then to 
Exclusive AND etc.  To accomplish that I described above.

You could add in artificial intelligence programing to provide an option for 
a smart compare and merge where it asks the author a series of questions such 
as: Do you want to retain sections of text that have no matching test in the 
open document? (Y or N).

This would enable the function of build a set of rules to perform the 
compare and merge and attain the authors goal.

4. Accepting or rejecting changes under Compare and Merge Documents - Word Document management

5. Compare and Merge documents - deletions & insertions both show as insertions

When I use Compare and Merge documents, all the text that should show
up as deletions (text in the old document that is not in the new one)
are showing up as insertions instead.  I can't distinguish between the
insertions and the deletions.  When I change the designated colors of
deletions, they show up with whatever color or format I designate for
insertions.  What's going on?

This used to work fine in our previous version of Word, when it used
to be called Compare Documents.

If I turn on Tracking and add fresh changes, the fresh changes are in
the proper colors.

I posted the same problem on March 10, but I lost interest because it
temporarlily started working again.  Nowadays it almost never works.

 On Mar 10, 3:36 pm, Dan Williams < XXXX@XXXXX.COM >
wrote:
> When I compare/merge two documents, all the parts that should show up
> as deletions are showing up as insertions instead.  I can't
> distinguish between the insertions and the deletions.  When I change
> the colors of insertions and deletes, they both show up with whatever
> color or format I designate for insertions.  What's going on?
>
> I don't remember whether I've seen it working properly or not since we
> switched to Word 2003.  It used to work fine in the previous version
> of Word, when it used to be called Compare Documents.
>
> Word 2003
> Windows 2001
>
> Dan Williams
> danwPlanet


I also see that someone else posted the problem last August and got no
replies.

On Aug 15 2008, 5:38 pm, RSunday < XXXX@XXXXX.COM >
wrote:
> I have two almost identical documents. To find the difference I do a "Compare and Merge document" in tools.
>
> Normally deletions would show up in red striketrough and inserts in
> underlined blue (because I have set it like that). But somehow everything
> show up as "inserts" - also the text elemets that have been deleted.
>
> It does not help to change the sequence of my documents (which one I open
> first or use to show my changes).
>
> I have made two very simple documents for testing - here it shows up
> correctly. But in my real documents it doesn't work. I have tried to remove
> all formatting from both documents - but with no effect. When I insert the
> contents of my test documents in my real documents - suddenly these changes
> also all show up as inserts...
>
> Any suggestions?


Word 2003
Windows xp

Dan Williams
danwPlanet




6. Problems with compare and merge document command - Word Document management

7. What is "Find formatting" in Compare-and-Merge-Documents

I'm using Office 2003.  From surfing, I've found that the find-
formatting switch "show[s] all differences in formatting, not just
differences in the text contained in the document".  Simple enough.

However, I am also presented with a dialog box saying "Word can only
store one set of formatting changes in the final, merged document.
Choose which set of formatting changes to keep."  I have to choose one
of the two documents being compared.  So my question is, what is meant
by the "formatting changes" for document 1, versus the "formatting
changes" for document 2?  I don't have tracked changes on, so
shouldn't be any set of changes associated with a one document.

I'm wondering if the messages means the changes *between* documents,
and I am asked which is the "original" and which is the revised?  To
me, asking the user for such a choice doesn't make sense because the
Comare-and-Merge function already takes one of the documents as the
original, and the 2nd document as the revised document.

Thanks for any clarification.

Fred

8. Compare and Merge documents - Microsoft Word