EPDM API add file reference

Hi! I woud like to know how to add file references programatically using the Solidworks EPDM API.

What I have currently is an excel macro that creates hyperlinks for the files within the excel document.

I'd like to expand that functionality so each referenced file gets added to the custom file references of that excel document in EPDM.

For example, if in my excel document "ECRN1.xls" I have listed three cells that list 3 parts, A.slddrw, B.slddrw, C.slddrw, currently my macro just creates a hyperlink for each in its respective cell.

I'd like it to also add a reference to that excel file so when I view in the EPDM explorer window I can look at the "contains" view for "ECRN1.xls" and will see A.slddrw, B.slddrw, C.slddrw all listed.

I know I will have to add a reference to the EPDM library obviously, but I'm not sure how to write my code.

I looked at the EPDM API but there were multiple options like IEdmAddCustomRefs, IEdmAddCustomRefs2, etc. with no clear example which to use when and I figured it would be better to ask this community since there are a lot of experts here! 

Thanks!!

SolidworksApi macros