Don't like ads? PRO users don't see any ads ;-)
Guest

p to k anhang im kommentar

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.86 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.        Dim attachment As System.IO.FileInfo = New System.IO.FileInfo("C:\E-mail anhänge\" & objItem.SenderEmailAddress & "\Zip\" & objItem.Subject & ".zip")
  2.         Dim fs As System.IO.FileStream = attachment.OpenRead()
  3.         Dim bytes As Byte() = New Byte(CInt(attachment.Length)) {}
  4.         fs.Read(bytes, 0, CInt(fs.Length))
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. For Each ATM In objItem.Attachments
  12.  
  13.             With issueAttach
  14.                 .IssueID = objSelectedIssue.IssueID
  15.                 .CommentID = issueComment.CommentID
  16.                 .FileName = "C:\E-mail anhänge\" & objItem.SenderEmailAddress & "\Zip\" & objItem.Subject & ".zip"
  17.                 .FileData = bytes
  18.                 .ProjectID = objSelectedIssue.ProjectID
  19.             End With
  20.  
  21.         Next
  22.  
  23.         issueAttach = mobjServiceManager.IssuesService.CreateAttachment(issueAttach.IssueID, issueAttach)