your question is not completely clear to me
see first the OTA manuals
Reference to OTA COM TYPE Library manual HP ALM Open Test Architecture API Reference Version 12.50
Reference to HP UFT repository util search CreateObject("Mercury.ObjectRepositoryUtil")
Reference to HP UFT object library UFT Automation Object Model Reference
suggestion is to write it from Excel VBA first with createobject("tdconnection.application") and setting the references to the otaclient.dll
as its then much easier to step/debug then by using HP UFT immediately
from there on you can get a testset with a certain name
'tdc is the global TDConnection object.
Set tdc = CreateObject("TDAPIOLE80.TDConnection")
Set TSetFact = tdc.TestSetFactory
add a new run
add the excel/word document as an attachment to the new run
Set NewRun = RunF.AddItem(Null)
NewRun.Status = "No Run"
NewRun.Name = "run 01"
not 100% sure on above but this is another example
file = myattachments.AddItem()
AttachmentFactory attachmentFactory = (AttachmentFactory)TstTest.Attachments;
TDAPIOLELib.Attachment attachment = (TDAPIOLELib.Attachment)attachmentFactory.AddItem("demoAttach.txt");
attachment.Description = "Bug Sample Attachment";
IExtendedStorage exStrg = attachment.AttachmentStorage;
exStrg.ClientPath = "E:\\TestData";