I change each workspace name's connection properties to the new property set:
            dataLayer = (IDataLayer)featureLayer;
            datasetName = (IDatasetName)dataLayer.DataSourceName;
            workspaceName = (IWorkspaceName)datasetName.WorkspaceName;
            workspaceName.ConnectionProperties = newMXDPropertySet;
I am not clear on how to get the Application or DataLayer from the MXDocument information I have; can you please include the code to do this?
Thank you.