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

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
 
U

Urs Ruefenacht

giving an answer to myself :)

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

cheers
oers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top