olOle

  • Thread starter Thread starter Boyan
  • Start date Start date
B

Boyan

I have the following situation.

5 contacts were drag&drop onto journal item. A new Journal item is
created with 5 attachments. Attachments type is olOle. I want to read
back these attachments as OutlookContact item.

Sample code works if there is started Outlook Application with
selected journal item of decribed type:

Private Sub Command9_Click()
Dim app As New Outlook.Application
Dim item As Outlook.JournalItem
Set item = app.ActiveExplorer.Selection(1)

GetContatctsFromAttachments(item)
End Sub


Public Function GetContatctsFromAttachments(dropItem As Object) As
String
On Error resume next
Dim ci As Outlook.contactItem

MsgBox dropItem.Attachments.Count

Dim attachment As Outlook.attachment
For Each attachment In dropItem.Attachments
Set ci = attachment //type mismatch error of cource
Next
End Function
 
Back
Top