Merge.Application Object

This object forms the root of the Merge object model. It is the only object that can be created by automation clients. The methods and properties exposed by this object can be used to alter the appearance of the Merge application window, and to create instances of other objects within the object model.

Visual Basic example

Dim mergeApp As Merge70.Application
Set mergeApp = New Merge70.Application



The active state of the Merge application window.

IDL [propget] HRESULT Active([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Active([in] VARIANT_BOOL newValue)
.NET Boolean Active[get, set]
VB6 Active As Boolean


Creates and returns a reference to a new BinaryComparison object.

IDL [propget] HRESULT BinaryComparison([out, retval] IBinaryComparison** pValue)
.NET BinaryComparison BinaryComparison[get]
VB6 BinaryComparison As BinaryComparison


Creates and returns a reference to a new Encodings object.

IDL [propget] HRESULT Encodings([out, retval] IEncodings** pValue)
.NET Encodings Encodings[get]
VB6 Encodings As Encodings


Creates and returns a reference to a new FolderComparison object.

IDL [propget] HRESULT FolderComparison([out, retval] IFolderComparison** pValue)
.NET FolderComparison FolderComparison[get]
VB6 FolderComparison As FolderComparison


The height of the Merge application window in pixels.

IDL [propget] HRESULT Height([out, retval] long* pValue)
[propput] HRESULT Height([in] long newValue)
.NET Int32 Height[get, set]
VB6 Height As Long


Creates and returns a reference to a new ImageComparison object.

IDL [propget] HRESULT ImageComparison([out, retval] IImageComparison** pValue)
.NET ImageComparison ImageComparison[get]
VB6 ImageComparison As ImageComparison


The location of the left edge pixel coordinate of the Merge application window.

IDL [propget] HRESULT Left([out, retval] long* pValue)
[propput] HRESULT Left([in] long newValue)
.NET Int32 Left[get, set]
VB6 Left As Long


Indicates whether the Merge application window is maximized.

IDL [propget] HRESULT Maximized([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Maximized([in] VARIANT_BOOL newValue)
.NET Boolean Maximized[get, set]
VB6 Maximized As Boolean


Indicates whether the Merge application window is minimized.

IDL [propget] HRESULT Minimized([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Minimized([in] VARIANT_BOOL newValue)
.NET Boolean Minimized[get, set]
VB6 Minimized As Boolean


Provides access to Merge preferences.

IDL [propget] HRESULT Preferences([out, retval] IPreferences** pValue)
.NET Preferences Preferences[get]
VB6 Preferences As Preferences


Creates and returns a reference to a new TextComparison object.

IDL [propget] HRESULT TextComparison([out, retval] ITextComparison2** pValue)
.NET TextComparison TextComparison[get]
VB6 TextComparison As TextComparison


The location of the top edge pixel coordinate of the Merge application window.

IDL [propget] HRESULT Top([out, retval] long* pValue)
[propput] HRESULT Top([in] long newValue)
.NET Int32 Top[get, set]
VB6 Top As Long


The version of Merge being automated. The string is of the format <majorVersion>.<minorVersion>.<buildNumber> (e.g. 7.0.1234).

IDL [propget] HRESULT Version([out, retval] BSTR* pValue)
.NET String Version[get]
VB6 Version As String


Indicates whether the Merge application window is visible.

IDL [propget] HRESULT Visible([out, retval] VARIANT_BOOL* pValue)
[propput] HRESULT Visible([in] VARIANT_BOOL newValue)
.NET Boolean Visible[get, set]
VB6 Visible As Boolean


The width of the Merge application window in pixels.

IDL [propget] HRESULT Width([out, retval] long* pValue)
[propput] HRESULT Width([in] long newValue)
.NET Int32 Width[get, set]
VB6 Width As Long



Closes the Merge application window.

.NET void Close()
VB6 Close


Compares two or three files or folders using the most appropriate type of comparison window. Returns an object representing a file or folder comparison.

IDL HRESULT CompareItems(
    [in] VARIANT firstItem,
    [in] VARIANT secondItem,
    [in, optional] VARIANT thirdItem,
    [out, retval] IComparison** pValue)
.NET IComparison CompareItems(
    Object firstItem,
    Object secondItem,
    Object thirdItem)
VB6 CompareItems(
    firstItem As Variant,
    secondItem As Variant
    [, thirdItem As Variant]) As IComparison
  • firstItem
    The name of the first file/folder to be compared.
  • secondItem
    The name of the second file/folder to be compared.
  • thirdItem optional
    The name of the third file/folder to be compared.


Gives control over the lifetime of the Merge application to the user. Merge will not automatically close when outstanding automation references are released.

IDL HRESULT GiveUserControl()
.NET void GiveUserControl()
VB6 GiveUserControl


Opens a previously saved .cmp7 or .Comparison7 file, containing a saved file or folder comparison, or workspace. The current state of Merge options will be overwritten by the state of Merge options when the file was created.

IDL HRESULT OpenComparison(
    [in] BSTR filename)
.NET void OpenComparison(
    String filename)
VB6 OpenComparison(
    filename As String)
  • filename
    The name of the comparison file that should be opened.


Restores the Merge application window from minimized or maximised state to its normal resizable state.

.NET void Restore()
VB6 Restore


Saves the open comparisons to a workspace file.

IDL HRESULT SaveWorkspace(
    [in] BSTR filename)
.NET void SaveWorkspace(
    String filename)
VB6 SaveWorkspace(
    filename As String)
  • filename
    The name of the file to which the workspace should be saved. The extension .cmp7 is strongly recommended.