Commit open document by type