A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to run my Mcros that i have created in VB editor?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 23rd 07, 01:49 AM posted to microsoft.public.outlook.program_vba
Chenna Krishna
external usenet poster
 
Posts: 1
Default How to run my Mcros that i have created in VB editor?

Hi,

I have used the follwing code in the VB editor.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If Len(Trim(strSubject)) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for
Subject") = vbNo Then
Cancel = True
End If
End If
End Sub

The above code should not send any message from my outlook which has empty
subject. The problem that i face is it has worked successfuly when i have
done first time but now its not executing.
Please help me in this regard.
Thanks in advance,

Regards,
Chenna Krishna
  #3  
Old December 23rd 07, 08:25 PM posted to microsoft.public.outlook.program_vba
Chenna Krishna[_2_]
external usenet poster
 
Posts: 2
Default How to run my Mcros that i have created in VB editor?

Yes it is in the hisOutlookSession only.
I have reduced the macro security level to low also and executed but no
results.

"Ken Slovak - [MVP - Outlook]" wrote:

Is it in the ThisOutlookSession class module?

Are macros enabled for running in Tools, Macro, Security?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Chenna Krishna" Chenna wrote in message
...
Hi,

I have used the follwing code in the VB editor.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If Len(Trim(strSubject)) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check
for
Subject") = vbNo Then
Cancel = True
End If
End If
End Sub

The above code should not send any message from my outlook which has empty
subject. The problem that i face is it has worked successfuly when i have
done first time but now its not executing.
Please help me in this regard.
Thanks in advance,

Regards,
Chenna Krishna



  #4  
Old December 23rd 07, 10:27 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to run my Mcros that i have created in VB editor?

Did you restart Outlook after changing the setting? Outlook reads that
setting on startup.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Chenna Krishna" wrote in message
...
Yes it is in the hisOutlookSession only.
I have reduced the macro security level to low also and executed but no
results.


  #5  
Old December 23rd 07, 10:56 PM posted to microsoft.public.outlook.program_vba
Chenna Krishna[_2_]
external usenet poster
 
Posts: 2
Default How to run my Mcros that i have created in VB editor?

Yes i have closed the outlook and started again. Do i need to restart my
system also because i wil be restarting my system only for 15-20 days once.

"Ken Slovak - [MVP - Outlook]" wrote:

Did you restart Outlook after changing the setting? Outlook reads that
setting on startup.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Chenna Krishna" wrote in message
...
Yes it is in the hisOutlookSession only.
I have reduced the macro security level to low also and executed but no
results.



  #6  
Old December 24th 07, 08:06 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to run my Mcros that i have created in VB editor?

You just need to restart Outlook.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Chenna Krishna" wrote in message
...
Yes i have closed the outlook and started again. Do i need to restart my
system also because i wil be restarting my system only for 15-20 days
once.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003 and Word as email editor - newly created emails appear under 'Word' on taskbar KingCronos Outlook - General Queries 1 October 23rd 07 10:31 PM
IE: : PDF Editor Jimmy Hsu Outlook Express 1 May 5th 07 05:59 AM
Cannot get into VBA editor (ALT-F11) Scott Emick Outlook - General Queries 1 May 10th 06 05:48 PM
Use 3rd Party Editor in Outlook not Word or Built in Editor Charles Outlook - Installation 1 March 28th 06 04:32 PM
Word as editor [email protected] Outlook - General Queries 0 January 19th 06 05:25 PM


All times are GMT +1. The time now is 07:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.