compare any two documents

P

Princess Kitty

I need a macro that will compare the active document with one the user
specifies. I found the code on MSDN but that only shows you how to compare
the active doc with one specified in the code. I need the user to be able to
specify the second doc.
Thank you.
 
D

DSUK

You could use an Inputbox to allow user input, The text that is input could
then be used by the code as the location of the second file.
 
D

Doug Robbins - Word MVP

The following method was originally posted by fellow MVP, Jonathon West and
will allow the user to navigate to the desired file:

Public Function BrowseFile() As String
With Dialogs(wdDialogFileOpen)
If .Display <> -1 Then
BrowseFile = ""
Else
BrowseFile = WordBasic.FileNameInfo$(.Name, 1)
End If
End With
End Function

It returns the full pathname of the selected file, and a blank string if no
selection is made.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top