Invariably there will be several operations that can cause some change to occur in the server document that the user is editing. Your application may currently set some global flag in all of these cases. Isolate code to change that flag into a separate function that you can then call from each change case.
When you add OLE linking support, you must notify the client application that the data has changed. By creating a function to call every time your application changes the dirty flag, you create a single place to add the client notification call and prevent yourself from having to find and modify (which means possibly miss) all the cases where you change the dirty flag.