Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

Re: How to get the attachment file on OTA Client API for HP ALM 11 ? Adding image to document

$
0
0

Thanks for the replay. This is my newest code fragment:

 

If(list.Item(I).HasAttachment) Then

  stepFactory = list.Item(I).Attachments

  attachList = stepFactory.NewList("")

 

 For attachmentCounter = 1 ToattachList.Count

     tAttach = attachList.Item(attachmentCounter)

  Dim localAdder AsString = "C:\temp\"

     tAttach.Load(True, localAdder& tAttach.Name)

     MsgBox(File.Exists(localAdder& tAttach.Name) & " "& tAttach.FileSize)

 

  If tAttach.Name.Contains(".jpg") Or tAttach.Name.Contains(".png") Or tAttach.Name.Contains(".gif") Or tAttach.Name.Contains(".JPG") Or tAttach.Name.Contains(".PNG") Or tAttach.Name.Contains(".GIF") Then

 

         ObjectPool.ClassWord.goToTheEnd()

         ObjectPool.ClassWord.newLine(2)

         ObjectPool.ClassWord.setHeader("Attachment: "& tAttach.Name, "Heading 3")

         ObjectPool.ClassWord.newLine(2)

 

    If File.Exists( localAdder& tAttach.Name) Then

             MsgBox(tAttach.ServerFileName & " exist")

             ObjectPool.ClassWord.addPicture( localAdder& tAttach.Name)

    Else

             MsgBox( localAdder& tAttach.Name& " does not exist")

             ObjectPool.ClassWord.addPicture( localAdder& tAttach.Name)

 

    EndIf

          ObjectPool.ClassWord.newLine(2)

Next

 

the problem is:

I could not found the attachment file on my own drive (client side)? Is there any bugs on the load method? 


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>