Modifica

Condividi tramite


Sync.ResolveConflict(MsoSyncConflictResolutionType) Method

Definition

Resolves conflicts between the local and the server copies of a shared document.

public:
 void ResolveConflict(Microsoft::Office::Core::MsoSyncConflictResolutionType SyncConflictResolution);
public void ResolveConflict (Microsoft.Office.Core.MsoSyncConflictResolutionType SyncConflictResolution);
abstract member ResolveConflict : Microsoft.Office.Core.MsoSyncConflictResolutionType -> unit
Public Sub ResolveConflict (SyncConflictResolution As MsoSyncConflictResolutionType)

Parameters

Remarks

Use the ResolveConflict method to resolve differences between the local copy of the active document and the server copy. Use the msoSyncConflictMerge option (not available for a Microsoft Excel Workbook) to merge the changes from each document into the other. Replace the server copy with local changes by using the msoSyncConflictClientWins option, or replace the local copy with the changed server copy by using the msoSyncConflictServerWins option.

The msoSyncConflictMerge option merges changes made to the server copy into the local copy, but does not actually resolve the conflict. In order to resolve the conflict with the merged changes winning, you must save the active document after merging changes, and then call the ResolveConflict method again with the msoSyncConflictClientWins option.

The ResolveConflict method can encounter a conflict condition if the client is unaware of recent changes to the server copy of the shared document. Call the GetUpdate() method before calling ResolveConflict to refresh the status of the server copy and to detect a possible conflict.

The ResolveConflict method raises a run-time error if the local document has unsaved changes or if no conflict exists between the two copies of the document.

Not all document synchronization problems raise trappable run-time errors. After performing an operation using the Sync object, it's a good idea to check the Status property; if the Status property is msoSyncStatusError, check the ErrorType property for additional information on the type of error that has occurred.

Applies to