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 - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to send private messages with this script ON??



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 25th 06, 04:54 PM posted to microsoft.public.outlook
moony marouane
external usenet poster
 
Posts: 4
Default How to send private messages with this script ON??

Hi All,

----------------------------
Here is my config :
Messaging server : W2k Server / Exchange 2k
Users computers : W2k Pro / Ms Outlook 2000
----------------------------

I'm using this script (in outlook of all my users) to send a copy of each
outgoing message to :
----------------------------
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim ObjItem As MailItem
Dim ObjNs As NameSpace
Dim ObjElementsenvoyes As MAPIFolder
Dim ObjRecip As Recipient
Set ObjNs = Application.GetNamespace("MAPI")
Set ObjElementsenvoyes = ObjNs.GetDefaultFolder(olFolderSentMail)
Set ObjRecip = " )
ObjRecip.Type = olBCC
ObjRecip.Resolve
End Sub
----------------------------

And I add this mailbox ) to outlook (for all
users) so that they can all see it, but sometimes some users need to send
private messages that the others doesn't have to see.

What should I add to this script?
Any suggestions?

Thanks in advance.


Ads
  #2  
Old January 30th 06, 11:30 AM posted to microsoft.public.outlook
moony marouane
external usenet poster
 
Posts: 4
Default How to send private messages with this script ON??

I got this reply in another forum:

*********************************************
If you looked in the object browser, you'd see that the MailItem object has
a Subject field. The function to search inside one string for another is
Instr(). Put them together and you get:
If Instr(Item.Subject, "Private") 0 Then
' put your code to add the Bcc recipient here
End If
*********************************************

And that's exactly what I was looking for.
Many thanks
Moony

"moony marouane" a écrit dans le message de
...
Hi All,

----------------------------
Here is my config :
Messaging server : W2k Server / Exchange 2k
Users computers : W2k Pro / Ms Outlook 2000
----------------------------

I'm using this script (in outlook of all my users) to send a copy of each
outgoing message to :
----------------------------
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim ObjItem As MailItem
Dim ObjNs As NameSpace
Dim ObjElementsenvoyes As MAPIFolder
Dim ObjRecip As Recipient
Set ObjNs = Application.GetNamespace("MAPI")
Set ObjElementsenvoyes = ObjNs.GetDefaultFolder(olFolderSentMail)
Set ObjRecip = " )
ObjRecip.Type = olBCC
ObjRecip.Resolve
End Sub
----------------------------

And I add this mailbox ) to outlook (for all
users) so that they can all see it, but sometimes some users need to send
private messages that the others doesn't have to see.

What should I add to this script?
Any suggestions?

Thanks in advance.




 




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 startup script error [email protected] Outlook - General Queries 0 January 24th 06 08:34 PM
Writing a script -- to launch program from Outlook and paste phone number into it [email protected] Outlook - General Queries 0 January 20th 06 03:11 AM
my messages do not appear in my inbox without clicking on send/re. misterdoo Outlook - General Queries 1 January 18th 06 01:10 AM
messages send out with delay Melanie Klötz Outlook - General Queries 1 January 16th 06 03:58 PM
File send send Link by Email problems in IE after Thunderbird Install Woody Outlook - General Queries 0 January 8th 06 01:26 AM


All times are GMT +1. The time now is 03:14 PM.


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.