![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I'm new to VBA and I'm trying to find some relevant links to this topic. What I'm trying to do is that once user clicks on "send message" the message will be scanned if it contains any attachments and if not a popup will show up asking if he wants to add attachment to the message. So, what I need to know are informations about adding action to pre- defined button in outlook, checking if attachment was added and then regarding the answer on popup send the message or get back to attachement addition. Thank you for any help. Marek Zacik |
Ads |
#2
|
|||
|
|||
![]()
Take a look at the sample at http://www.outlookcode.com/codedetail.aspx?id=553
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "kkappabear" wrote in message oups.com... Hi, I'm new to VBA and I'm trying to find some relevant links to this topic. What I'm trying to do is that once user clicks on "send message" the message will be scanned if it contains any attachments and if not a popup will show up asking if he wants to add attachment to the message. So, what I need to know are informations about adding action to pre- defined button in outlook, checking if attachment was added and then regarding the answer on popup send the message or get back to attachement addition. Thank you for any help. Marek Zacik |
#3
|
|||
|
|||
![]()
I've got no idea what was wrong, anyway it doesn't worked properly, so
I've wrote a simpler version: Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim lngres As Long If Item.Attachments.Count = 0 Then lngres = MsgBox("No attachments, continue?", _ vbYesNo + vbDefaultButton2 + vbQuestion + vbSystemModal, "Auto control...") If lngres = vbNo Then Cancel = True End If End Sub all works fine, but the popup shows in the main outlook window and once I click to "No" I would like to switch the "New mail" window back. Is it possible to toggle the new mail window after Cancel=True ? On 30. Júl, 13:17 h., "Sue Mosher [MVP-Outlook]" wrote: Take a look at the sample athttp://www.outlookcode.com/codedetail.aspx?id=553 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "kkappabear" wrote in ooglegroups.com... Hi, I'm new to VBA and I'm trying to find some relevant links to this topic. What I'm trying to do is that once user clicks on "send message" the message will be scanned if it contains any attachments and if not a popup will show up asking if he wants to add attachment to the message. So, what I need to know are informations about adding action to pre- defined button in outlook, checking if attachment was added and then regarding the answer on popup send the message or get back to attachement addition. Thank you for any help. Marek Zacik |
#4
|
|||
|
|||
![]()
Did you try this:
Set insp = Item.GetInspector insp.Activate -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "kkappabear" wrote in message ups.com... I've got no idea what was wrong, anyway it doesn't worked properly, so I've wrote a simpler version: Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim lngres As Long If Item.Attachments.Count = 0 Then lngres = MsgBox("No attachments, continue?", _ vbYesNo + vbDefaultButton2 + vbQuestion + vbSystemModal, "Auto control...") If lngres = vbNo Then Cancel = True End If End Sub all works fine, but the popup shows in the main outlook window and once I click to "No" I would like to switch the "New mail" window back. Is it possible to toggle the new mail window after Cancel=True ? On 30. Júl, 13:17 h., "Sue Mosher [MVP-Outlook]" wrote: Take a look at the sample athttp://www.outlookcode.com/codedetail.aspx?id=553 "kkappabear" wrote in ooglegroups.com... Hi, I'm new to VBA and I'm trying to find some relevant links to this topic. What I'm trying to do is that once user clicks on "send message" the message will be scanned if it contains any attachments and if not a popup will show up asking if he wants to add attachment to the message. So, what I need to know are informations about adding action to pre- defined button in outlook, checking if attachment was added and then regarding the answer on popup send the message or get back to attachement addition. Thank you for any help. Marek Zacik |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Names Added Automatically to Address Book | Guv Bob | Outlook Express | 1 | June 9th 07 07:30 PM |
how to get emailers automatically added to contacts when I reply | actiongr | Outlook - Using Contacts | 1 | January 4th 07 11:04 PM |
How do I prevent meeting requests from automatically being added? | Matthew Something | Outlook - Calandaring | 0 | October 12th 06 01:09 PM |
Sending email with attachment produces error message but email is | OW | Outlook Express | 3 | June 24th 06 08:59 PM |
Can an automatic message be added when sending encrypted e-mail? | Carnitram | Outlook and VBA | 1 | June 7th 06 04:53 PM |