Go to 'Tools~options~folders' specify the path in QC where you have uploaded the file.
I am unaware of the COM API but I suppose you specify the absolute file name. Instead now you can specify only the file name i.e. Object.Open "1.xls" and it will fetch the file from the designated path.
You are right I was mixing QTP functionalities with general VBScripting. I contacted mercury and they told me to look for KB Artical 36734.
I am using following function but get an General Run error msg at "Set CurrentTest = TDUtil.CurrentTest".
<font class="small">Code:</font><hr /><pre>
Public Function GetAttachment(FileName, OutPath)
Set CurrentTest = TDUtil.CurrentTest
GetAttachment = GetAttachmentFromTestObject(CurrentTest, FileName, OutPath)
FilePath = GetAttachment("[QualityCenter] Subject\Automation_Structure\DriverFile.vbs", "C:\Temp\")
MsgBox "Your file is here:" & FilePath