Assigning a filename to document manager component

Hello All,

For replacing a file using document manager component I know the filename that is to be replaced how to make this file as the document manager component file using the filename.?

Thank you

SolidworksApi macros