01-13-2008, 12:19 PM
If you wish to do this manually its straightforward. For automating the task you can use the code below:
Code:
LocalFilePath = "C:\Results\Result1.txt" 'Path where your file to be uploaded is located in 'your local hard disk.
Folder_Name = "Subject\Demo\Results" 'Path in Quality Center where you wish to store the
'attachment
Set TDConnection = QCUtil.TDConnection
Set treeManager = TDConnection.TreeManager
Set folder = treeManager.nodebypath(Folder_Name)
set att = folder.attachments
Set atta = att.AddItem(Null)
atta.FileName = LocalFilePath
atta.Type = 1
atta.Post()
Want to fast track your QTP/UFT Learning? Join our UFT Training Course