Selecting attachments... 
Author Message
 Selecting attachments...

Hallo,
there's a way to select the attached files that i've got to process with
dll.ProtocollaAllegato function

i've coded a simple but ugly-looking solution that does that, but i was
looking for a standard property that tells me if an attached file is
selected or not.

eventually i was thinking to prompt the user with a listbox, and ask him to
select the specified files...

please help me!!

--------------- This is my code: ( oMail is an existing Outlook.MailItem
object) ----------------

Public Sub MySub
  Dim dll        As Object
  Dim ret        As Integer
  Dim errCode    As Long
  Dim errDescr   As String
  Dim attachColl As New Collection
  Dim attachFile As String
  Dim idxAttach  As Integer

  Set dll = CreateObject("GOR_PI_UILib.ClsProtocollaEmail")

  If Not dll Is Nothing Then

    For idxAttach = 1 To oMail.Attachments.Count
      attachFile = ""

'-----------------------------------------------------------------
'
        If MsgBox("Protocollare l'allegato " &
oMail.Attachments(idxAttach).FileName, _
   vbOKCancel  vbInformation, "Protocolla allegato") = vbOK Then

            If Len(oMail.Attachments(idxAttach).PathName) Then
                attachFile = oMail.Attachments(idxAttach).PathName & "\"
            End If

            attachFile = attachFile & oMail.Attachments(idxAttach).FileName
            attachColl.Add attachFile
        End If
'
'-----------------------------------------------------------------

    Next

    ret = dll.ProtocollaAllegato(attachColl, errCode, errDescr)

    If ret = 0 Then
      MsgBox "Error while parsing message " & vbCrLf & "received on " &
oMail.ReceivedTime & " :" & vbCrLf & vbCrLf & errCode & " - " & errDescr,
vbOKOnly + vbCritical, "Protocolla Allegato"
    End If

  End If

  Set dll = Nothing
End Sub

--------------------- END OF CODE -------------------

have you got any ideas/suggestions?

thanks in advance,

Marco Milo.



Sat, 20 Sep 2003 23:51:57 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Save attachments for selected emails

2. Nested Attachments / Forwarded Attachments

3. Q: Attachment: How to insert filename of attachment in message body

4. add name of attachment to Subject line and delete attachment

5. How to get at attachments within attachments?

6. Attachments.remove is not removing attachment

7. Attachment in Attachment

8. vb Select * from tableA?How to select record from 1000 to 2500

9. Cetting A Report To Select Records Based Upon A Value Selected In A Combo Box

10. How do you select the currently selected contact

11. Find out the selected phoneno in a selected contact

12. Determine Selected Folder and Selected Item in Folder

 

 
Powered by phpBB® Forum Software