Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript in outlook 2000

Status
Not open for further replies.

rogsal

Programmer
May 12, 2004
10
0
0
SE
I want an automatic BCC in my mail and my problem is:
How do I find out if the Item is of instance,MailItem (Can be CalendarItem also)?

This is what I have so far:

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

Dim Tmp As MailItem

If item <what to write here?> MailItem Then
Set Tmp = Item

End If


In any normal language you would do
if (item instanceof MailItem) {...
but how is it done in VBScript ???

Any help greatly appreciated!!!
Roger
 
Wrong forum. Your code is VBA not VBScript.

You might consider testing the value of an item's OlObjectClass property though. There is also the more general and mighty fine VB/VBA/VBScript function TypeName().


Do all "normal" languages have bizarre, ad hoc operators like instanceof grafted onto them?

;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top