Outlook 2003 - show attachment dialog in a custom post form and testattachment

  • Thread starter Thread starter Urs Ruefenacht
  • Start date Start date
U

Urs Ruefenacht

I launch the Insert File Dialog for adding attachments with the
following code:

Set objInsp = Item.GetInspector
Set colCB = objInsp.CommandBars
Set objCBB = colCB.FindControl(, 1079)
If Not objCBB Is Nothing Then
objCBB.Execute
End If
Set objCBB = Nothing
Set colCB = Nothing
Set objInsp = Nothing

Now I like to check 2 things:
1. Has the attachment a permitted type (ex. ".txt")
2. Is there already an attachment to the form attached

In both cases, a message box should pop up and the file may not be attached.


thx in advance - cheers
oers
 
giving an answer to myself :-)

you can check this in the Item_AttachmentAdd(ByVal newAttachment) event.

cheers
oers
 
Back
Top