Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

1) I tried to trigger a macro itemsend. but its not trigerring on senting a mail.
Below is the code. macro security is set to "no security".

2)Also i am access data in excel(rows and columns) from outlook.
can any one suggest a faster way to access datas in a excel file from outlook.

=========================================
VB
Private WithEvents Items As Outlook.Items
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

   Item = MailItem

     If Item.To = "abc@abc.com" Then

         prompt$ = "Are you sure you want to send this message?"

       If MsgBox(prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check before Sending") = vbNo Then

       Cancel = True

      End If

    End If

End Sub

============================================

thanks in advance.
Posted
Updated 28-Apr-13 6:38am
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900