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

How compare 2 macros in vba word

Status
Not open for further replies.

thanhthanh12

Technical User
Nov 9, 2022
9
VN
I have a first macro (macro 1) in a Word document. An other user will record an other macro (macro 2). I want to compare two macros, if macro 1 is same macro 2, a messenger is displayed "The same", else is "Not same". How can i programming in vba word? Please help me! Thank you very much!
 
This can be done without VBA. Copy the first macro(s) to new word document, the second set to other document. Word has native functionality 'compare documents', changes will be marked in a new document.

A solution with direct access to the code requires a permission to it and reference to VBIDE library. After access to proper VBComponent, its CodeModule allows access to the code text.

combo
 
Copy the first macro(s) to new word document, the second set to other document. Word has native functionality 'compare documents', changes will be marked in a new document
Which is essentially what was advised here: - and with links to VBA solutions if needed.

Cheers
Paul Edstein
[Fmr MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top