HighTechTalks DotNet Forums  

VB script does not run

Dotnet FAQs microsoft.public.dotnet.faqs


Discuss VB script does not run in the Dotnet FAQs forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Sandy
 
Posts: n/a

Default VB script does not run - 10-25-2006 , 03:46 PM






I have added aVB script to check if subject is blank before email is sent. It
does not work for my laptop .. it works on my oclleagues machine.
What settings do I have to make/modify to enable it on my machine.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim strSubject As String

strSubject = Item.Subject

If Len(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

wll appreciate help.

Rgds
Sandy

Reply With Quote
  #2  
Old   
Scott M.
 
Posts: n/a

Default Re: VB script does not run - 10-25-2006 , 06:06 PM






Well, since .NET does not use VBScript, it's not hard to figure out why it
wouldn't work.


"Sandy" <Sandy (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have added aVB script to check if subject is blank before email is sent.
It
does not work for my laptop .. it works on my oclleagues machine.
What settings do I have to make/modify to enable it on my machine.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim strSubject As String

strSubject = Item.Subject

If Len(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

wll appreciate help.

Rgds
Sandy



Reply With Quote
Reply




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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.