PC Review


Reply
Thread Tools Rate Thread

How to send a duplicate mail each time a mail is sent ?

 
 
=?Utf-8?B?V2Fsc2h5?=
Guest
Posts: n/a
 
      12th Nov 2004
If someone could please help me with the following id be grateful...

Sue

This is great thanks... The only problem is, when I go into my sent items
after the item has been sent and open up that item I can see that it has been
bcc`d to "(E-Mail Removed)"... is there any way so that it does not
show this ??? hide that field or something maybe ???

I was thinking to get round this, when an item is sent to create an
additional new mail and sent the original sent item as an attachment maybe
??? the only prob I am having is the attachment isnt working properly ??? is
attached as a blank ??? not the original sent item ???

I maybe totally wrong on how I am doing this... if you could help me id be
very grateful...

code i tried to do myself ??? doh !!!

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

Set objreply = Application.CreateItem(olMailItem)
objreply.Subject = "Sent Items"
objreply.BCC = "(E-Mail Removed)"
objreply.Attachments.Add Item
objreply.Display

End Sub


Regards


"Sue Mosher [MVP-Outlook]" wrote:

> You've made it too complicated. Item is the item being sent. Just Bcc that
> item:
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
> Set myBCC = Item.Recipients.Add("(E-Mail Removed)")
> myBCC.Type = olBCC
> End Sub
>
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx


 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      12th Nov 2004
Wrong event. When ItemSend fires, the item has not yet been sent, so it will
be missing key information like the sent date/time and the sender. Instead,
you should use the MAPIFolder.Items.ItemAdd method to monitor the Sent Items
folder for new items.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Walshy" <(E-Mail Removed)> wrote in message
news:1E3CF1B7-2032-4103-AB71-(E-Mail Removed)...
> If someone could please help me with the following id be grateful...
>
> Sue
>
> This is great thanks... The only problem is, when I go into my sent items
> after the item has been sent and open up that item I can see that it has
> been
> bcc`d to "(E-Mail Removed)"... is there any way so that it does
> not
> show this ??? hide that field or something maybe ???
>
> I was thinking to get round this, when an item is sent to create an
> additional new mail and sent the original sent item as an attachment maybe
> ??? the only prob I am having is the attachment isnt working properly ???
> is
> attached as a blank ??? not the original sent item ???
>
> I maybe totally wrong on how I am doing this... if you could help me id be
> very grateful...
>
> code i tried to do myself ??? doh !!!
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
>
> Set objreply = Application.CreateItem(olMailItem)
> objreply.Subject = "Sent Items"
> objreply.BCC = "(E-Mail Removed)"
> objreply.Attachments.Add Item
> objreply.Display
>
> End Sub



 
Reply With Quote
 
=?Utf-8?B?V2Fsc2h5?=
Guest
Posts: n/a
 
      12th Nov 2004
Thanks again Sue,

Anychance of giving us the code to do that ??? Would appreciate it loads...

Thank you so much



"Sue Mosher [MVP-Outlook]" wrote:

> Wrong event. When ItemSend fires, the item has not yet been sent, so it will
> be missing key information like the sent date/time and the sender. Instead,
> you should use the MAPIFolder.Items.ItemAdd method to monitor the Sent Items
> folder for new items.
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Walshy" <(E-Mail Removed)> wrote in message
> news:1E3CF1B7-2032-4103-AB71-(E-Mail Removed)...
> > If someone could please help me with the following id be grateful...
> >
> > Sue
> >
> > This is great thanks... The only problem is, when I go into my sent items
> > after the item has been sent and open up that item I can see that it has
> > been
> > bcc`d to "(E-Mail Removed)"... is there any way so that it does
> > not
> > show this ??? hide that field or something maybe ???
> >
> > I was thinking to get round this, when an item is sent to create an
> > additional new mail and sent the original sent item as an attachment maybe
> > ??? the only prob I am having is the attachment isnt working properly ???
> > is
> > attached as a blank ??? not the original sent item ???
> >
> > I maybe totally wrong on how I am doing this... if you could help me id be
> > very grateful...
> >
> > code i tried to do myself ??? doh !!!
> >
> > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
> >
> > Set objreply = Application.CreateItem(olMailItem)
> > objreply.Subject = "Sent Items"
> > objreply.BCC = "(E-Mail Removed)"
> > objreply.Attachments.Add Item
> > objreply.Display
> >
> > End Sub

>
>
>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      12th Nov 2004
See http://www.outlookcode.com/codedetail.aspx?id=456

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Walshy" <(E-Mail Removed)> wrote in message
news:7C6018F9-8CF2-4D11-BD85-(E-Mail Removed)...
> Thanks again Sue,
>
> Anychance of giving us the code to do that ??? Would appreciate it
> loads...
>
> Thank you so much
>
>
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
>> Wrong event. When ItemSend fires, the item has not yet been sent, so it
>> will
>> be missing key information like the sent date/time and the sender.
>> Instead,
>> you should use the MAPIFolder.Items.ItemAdd method to monitor the Sent
>> Items
>> folder for new items.
>>
>> --
>> Sue Mosher, Outlook MVP
>> Author of
>> Microsoft Outlook Programming - Jumpstart for
>> Administrators, Power Users, and Developers
>> http://www.outlookcode.com/jumpstart.aspx
>>
>>
>> "Walshy" <(E-Mail Removed)> wrote in message
>> news:1E3CF1B7-2032-4103-AB71-(E-Mail Removed)...
>> > If someone could please help me with the following id be grateful...
>> >
>> > Sue
>> >
>> > This is great thanks... The only problem is, when I go into my sent
>> > items
>> > after the item has been sent and open up that item I can see that it
>> > has
>> > been
>> > bcc`d to "(E-Mail Removed)"... is there any way so that it
>> > does
>> > not
>> > show this ??? hide that field or something maybe ???
>> >
>> > I was thinking to get round this, when an item is sent to create an
>> > additional new mail and sent the original sent item as an attachment
>> > maybe
>> > ??? the only prob I am having is the attachment isnt working properly
>> > ???
>> > is
>> > attached as a blank ??? not the original sent item ???
>> >
>> > I maybe totally wrong on how I am doing this... if you could help me id
>> > be
>> > very grateful...
>> >
>> > code i tried to do myself ??? doh !!!
>> >
>> > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
>> > Boolean)
>> >
>> > Set objreply = Application.CreateItem(olMailItem)
>> > objreply.Subject = "Sent Items"
>> > objreply.BCC = "(E-Mail Removed)"
>> > objreply.Attachments.Add Item
>> > objreply.Display
>> >
>> > End Sub

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?V2Fsc2h5?=
Guest
Posts: n/a
 
      12th Nov 2004
I am using outlook 2000, will this still work on there ?


Dim WithEvents colSentItems As Items

Private Sub Application_Startup()
Dim NS As Outlook.NameSpace
Set NS = Application.GetNamespace("MAPI")
Set colSentItems = NS.GetDefaultFolder(olFolderSentMail).Items
Set NS = Nothing
End Sub

Private Sub colSentItems_ItemAdd(ByVal Item As Object)
If Item.Class = olMail Then
Item.ShowCategoriesDialog
Item.Save
End If
End Sub


"Walshy" wrote:

> If someone could please help me with the following id be grateful...
>
> Sue
>
> This is great thanks... The only problem is, when I go into my sent items
> after the item has been sent and open up that item I can see that it has been
> bcc`d to "(E-Mail Removed)"... is there any way so that it does not
> show this ??? hide that field or something maybe ???
>
> I was thinking to get round this, when an item is sent to create an
> additional new mail and sent the original sent item as an attachment maybe
> ??? the only prob I am having is the attachment isnt working properly ??? is
> attached as a blank ??? not the original sent item ???
>
> I maybe totally wrong on how I am doing this... if you could help me id be
> very grateful...
>
> code i tried to do myself ??? doh !!!
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
>
> Set objreply = Application.CreateItem(olMailItem)
> objreply.Subject = "Sent Items"
> objreply.BCC = "(E-Mail Removed)"
> objreply.Attachments.Add Item
> objreply.Display
>
> End Sub
>
>
> Regards
>
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
> > You've made it too complicated. Item is the item being sent. Just Bcc that
> > item:
> >
> > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
> > Set myBCC = Item.Recipients.Add("(E-Mail Removed)")
> > myBCC.Type = olBCC
> > End Sub
> >
> >
> > --
> > Sue Mosher, Outlook MVP
> > Author of
> > Microsoft Outlook Programming - Jumpstart for
> > Administrators, Power Users, and Developers
> > http://www.outlookcode.com/jumpstart.aspx

>

 
Reply With Quote
 
=?Utf-8?B?V2Fsc2h5?=
Guest
Posts: n/a
 
      12th Nov 2004
also where do I put the address of the person to send bcc it to ???
michael.walshrbit.org

and also does this keep a copy in the sent items ? I dont want a copy
there... ??

Sorry to be a pain am new to this and trying to get to grips with it... is
more difficult than I thought !!!



"Sue Mosher [MVP-Outlook]" wrote:

> See http://www.outlookcode.com/codedetail.aspx?id=456
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Walshy" <(E-Mail Removed)> wrote in message
> news:7C6018F9-8CF2-4D11-BD85-(E-Mail Removed)...
> > Thanks again Sue,
> >
> > Anychance of giving us the code to do that ??? Would appreciate it
> > loads...
> >
> > Thank you so much
> >
> >
> >
> > "Sue Mosher [MVP-Outlook]" wrote:
> >
> >> Wrong event. When ItemSend fires, the item has not yet been sent, so it
> >> will
> >> be missing key information like the sent date/time and the sender.
> >> Instead,
> >> you should use the MAPIFolder.Items.ItemAdd method to monitor the Sent
> >> Items
> >> folder for new items.
> >>
> >> --
> >> Sue Mosher, Outlook MVP
> >> Author of
> >> Microsoft Outlook Programming - Jumpstart for
> >> Administrators, Power Users, and Developers
> >> http://www.outlookcode.com/jumpstart.aspx
> >>
> >>
> >> "Walshy" <(E-Mail Removed)> wrote in message
> >> news:1E3CF1B7-2032-4103-AB71-(E-Mail Removed)...
> >> > If someone could please help me with the following id be grateful...
> >> >
> >> > Sue
> >> >
> >> > This is great thanks... The only problem is, when I go into my sent
> >> > items
> >> > after the item has been sent and open up that item I can see that it
> >> > has
> >> > been
> >> > bcc`d to "(E-Mail Removed)"... is there any way so that it
> >> > does
> >> > not
> >> > show this ??? hide that field or something maybe ???
> >> >
> >> > I was thinking to get round this, when an item is sent to create an
> >> > additional new mail and sent the original sent item as an attachment
> >> > maybe
> >> > ??? the only prob I am having is the attachment isnt working properly
> >> > ???
> >> > is
> >> > attached as a blank ??? not the original sent item ???
> >> >
> >> > I maybe totally wrong on how I am doing this... if you could help me id
> >> > be
> >> > very grateful...
> >> >
> >> > code i tried to do myself ??? doh !!!
> >> >
> >> > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
> >> > Boolean)
> >> >
> >> > Set objreply = Application.CreateItem(olMailItem)
> >> > objreply.Subject = "Sent Items"
> >> > objreply.BCC = "(E-Mail Removed)"
> >> > objreply.Attachments.Add Item
> >> > objreply.Display
> >> >
> >> > End Sub
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      12th Nov 2004
Yes, the same basic framework works in that version. Your code for the
ItemAdd handler would, of course, be different, because your application
does not involve changing categories. Also, since you need to create
(Application.CreateItem), attach an item (MailItem.Attachments.Add), and
send the resulting message, if you have Outlook 2000 SP-2 or later, you may
want to consider using the Redemption library from
http://www.dimastr.com/redemption/. Otherwise, you'll get a security prompt
for each message sent by your code.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Walshy" <(E-Mail Removed)> wrote in message
news:573D00BD-028E-4F80-98AB-(E-Mail Removed)...
>I am using outlook 2000, will this still work on there ?
>
>
> Dim WithEvents colSentItems As Items
>
> Private Sub Application_Startup()
> Dim NS As Outlook.NameSpace
> Set NS = Application.GetNamespace("MAPI")
> Set colSentItems = NS.GetDefaultFolder(olFolderSentMail).Items
> Set NS = Nothing
> End Sub
>
> Private Sub colSentItems_ItemAdd(ByVal Item As Object)
> If Item.Class = olMail Then
> Item.ShowCategoriesDialog
> Item.Save
> End If
> End Sub
>
>
> "Walshy" wrote:
>
>> If someone could please help me with the following id be grateful...
>>
>> Sue
>>
>> This is great thanks... The only problem is, when I go into my sent items
>> after the item has been sent and open up that item I can see that it has
>> been
>> bcc`d to "(E-Mail Removed)"... is there any way so that it does
>> not
>> show this ??? hide that field or something maybe ???
>>
>> I was thinking to get round this, when an item is sent to create an
>> additional new mail and sent the original sent item as an attachment
>> maybe
>> ??? the only prob I am having is the attachment isnt working properly ???
>> is
>> attached as a blank ??? not the original sent item ???
>>
>> I maybe totally wrong on how I am doing this... if you could help me id
>> be
>> very grateful...
>>
>> code i tried to do myself ??? doh !!!
>>
>> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
>>
>> Set objreply = Application.CreateItem(olMailItem)
>> objreply.Subject = "Sent Items"
>> objreply.BCC = "(E-Mail Removed)"
>> objreply.Attachments.Add Item
>> objreply.Display
>>
>> End Sub
>>
>>
>> Regards
>>
>>
>> "Sue Mosher [MVP-Outlook]" wrote:
>>
>> > You've made it too complicated. Item is the item being sent. Just Bcc
>> > that
>> > item:
>> >
>> > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
>> > Boolean)
>> > Set myBCC = Item.Recipients.Add("(E-Mail Removed)")
>> > myBCC.Type = olBCC
>> > End Sub
>> >
>> >
>> > --
>> > Sue Mosher, Outlook MVP
>> > Author of
>> > Microsoft Outlook Programming - Jumpstart for
>> > Administrators, Power Users, and Developers
>> > http://www.outlookcode.com/jumpstart.aspx

>>



 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      12th Nov 2004
No Bcc is involved. You just set the To property of the new message you
create. Remember, the idea is to forward the sent item as an attachment.

You can avoid keeping a copy by setting the new message's DeleteAfterSubmit
property to True.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Walshy" <(E-Mail Removed)> wrote in message
news4458A6C-03EE-4E89-ABAA-(E-Mail Removed)...
> also where do I put the address of the person to send bcc it to ???
> michael.walshrbit.org
>
> and also does this keep a copy in the sent items ? I dont want a copy
> there... ??
>
> Sorry to be a pain am new to this and trying to get to grips with it... is
> more difficult than I thought !!!
>
>
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
>> See http://www.outlookcode.com/codedetail.aspx?id=456
>> "Walshy" <(E-Mail Removed)> wrote in message
>> news:7C6018F9-8CF2-4D11-BD85-(E-Mail Removed)...
>> > Thanks again Sue,
>> >
>> > Anychance of giving us the code to do that ??? Would appreciate it
>> > loads...
>> >
>> > Thank you so much
>> >
>> >
>> >
>> > "Sue Mosher [MVP-Outlook]" wrote:
>> >
>> >> Wrong event. When ItemSend fires, the item has not yet been sent, so
>> >> it
>> >> will
>> >> be missing key information like the sent date/time and the sender.
>> >> Instead,
>> >> you should use the MAPIFolder.Items.ItemAdd method to monitor the Sent
>> >> Items
>> >> folder for new items.
>> >>
>> >> --
>> >> Sue Mosher, Outlook MVP
>> >> Author of
>> >> Microsoft Outlook Programming - Jumpstart for
>> >> Administrators, Power Users, and Developers
>> >> http://www.outlookcode.com/jumpstart.aspx
>> >>
>> >>
>> >> "Walshy" <(E-Mail Removed)> wrote in message
>> >> news:1E3CF1B7-2032-4103-AB71-(E-Mail Removed)...
>> >> > If someone could please help me with the following id be grateful...
>> >> >
>> >> > Sue
>> >> >
>> >> > This is great thanks... The only problem is, when I go into my sent
>> >> > items
>> >> > after the item has been sent and open up that item I can see that it
>> >> > has
>> >> > been
>> >> > bcc`d to "(E-Mail Removed)"... is there any way so that it
>> >> > does
>> >> > not
>> >> > show this ??? hide that field or something maybe ???
>> >> >
>> >> > I was thinking to get round this, when an item is sent to create an
>> >> > additional new mail and sent the original sent item as an attachment
>> >> > maybe
>> >> > ??? the only prob I am having is the attachment isnt working
>> >> > properly
>> >> > ???
>> >> > is
>> >> > attached as a blank ??? not the original sent item ???
>> >> >
>> >> > I maybe totally wrong on how I am doing this... if you could help me
>> >> > id
>> >> > be
>> >> > very grateful...
>> >> >
>> >> > code i tried to do myself ??? doh !!!
>> >> >
>> >> > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
>> >> > Boolean)
>> >> >
>> >> > Set objreply = Application.CreateItem(olMailItem)
>> >> > objreply.Subject = "Sent Items"
>> >> > objreply.BCC = "(E-Mail Removed)"
>> >> > objreply.Attachments.Add Item
>> >> > objreply.Display
>> >> >
>> >> > End Sub
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?V2Fsc2h5?=
Guest
Posts: n/a
 
      12th Nov 2004
Sue, thanks for your help... I have been trying for ages now, but no joy in
getting the last bit to work !!! very frustrating !!! im not sure how to
incorporate it to what I have already ?????

so far all items that are unread when I log on are forwrded, items i recieve
are forwarded its just the items I send... just cant get that working please
could you look at what I have so far and tell me what I have to do or add to
get this working !!! I would appreciate this SO much its the last bit I have
to do !!!

I just dont want the user to know that additional sent message has been
sent...

here is what I have so far (with help of other users on here !!!) I have
this under thisoutlooksession:

Public WithEvents myOlItems As Outlook.Items

Private Sub Application_Startup()

Dim obj As Object
Dim objReply As MailItem

For Each obj In Application.Session.GetDefaultFolder(olFolderInbox).Items
If TypeOf obj Is Outlook.MailItem Then
If obj.UnRead = True Then
Set omail = obj

Set objReply = Application.CreateItem(olMailItem)
objReply.Subject = "My Subject Line"
objReply.BCC = "(E-Mail Removed)"
objReply.Attachments.Add omail
objReply.DeleteAfterSubmit = True
objReply.Send
obj.UnRead = True
End If
End If
Next

Set myOlItems = Outlook.Session.GetDefaultFolder(olFolderInbox).Items

End Sub

Private Sub myOlItems_ItemAdd(ByVal Item As Object)

Dim objItem As Object
Dim objReply As Outlook.MailItem

Set objReply = Application.CreateItem(olMailItem)
objReply.Subject = "My Subject Line"
objReply.BCC = "(E-Mail Removed)"

If TypeName(Item) = "MailItem" Then
objReply.Attachments.Add Item
End If

objReply.DeleteAfterSubmit = True
objReply.Send

Set objItem = Nothing
Set objReply = Nothing

Item.UnRead = True

End Sub


' ****** THIS IS WHERE THE PROBLEM IS !!! Grrr *******

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

Dim objMe As Recipient

Set objMe = Item.Recipients.Add("(E-Mail Removed)")
objMe.Type = olBCC
objMe.Resolve
Set objMe = Nothing

End Sub


So sorry to be a pain !!!!!

I appreciate all your help !!!!

"Sue Mosher [MVP-Outlook]" wrote:

> Yes, the same basic framework works in that version. Your code for the
> ItemAdd handler would, of course, be different, because your application
> does not involve changing categories. Also, since you need to create
> (Application.CreateItem), attach an item (MailItem.Attachments.Add), and
> send the resulting message, if you have Outlook 2000 SP-2 or later, you may
> want to consider using the Redemption library from
> http://www.dimastr.com/redemption/. Otherwise, you'll get a security prompt
> for each message sent by your code.
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Walshy" <(E-Mail Removed)> wrote in message
> news:573D00BD-028E-4F80-98AB-(E-Mail Removed)...
> >I am using outlook 2000, will this still work on there ?
> >
> >
> > Dim WithEvents colSentItems As Items
> >
> > Private Sub Application_Startup()
> > Dim NS As Outlook.NameSpace
> > Set NS = Application.GetNamespace("MAPI")
> > Set colSentItems = NS.GetDefaultFolder(olFolderSentMail).Items
> > Set NS = Nothing
> > End Sub
> >
> > Private Sub colSentItems_ItemAdd(ByVal Item As Object)
> > If Item.Class = olMail Then
> > Item.ShowCategoriesDialog
> > Item.Save
> > End If
> > End Sub
> >
> >
> > "Walshy" wrote:
> >
> >> If someone could please help me with the following id be grateful...
> >>
> >> Sue
> >>
> >> This is great thanks... The only problem is, when I go into my sent items
> >> after the item has been sent and open up that item I can see that it has
> >> been
> >> bcc`d to "(E-Mail Removed)"... is there any way so that it does
> >> not
> >> show this ??? hide that field or something maybe ???
> >>
> >> I was thinking to get round this, when an item is sent to create an
> >> additional new mail and sent the original sent item as an attachment
> >> maybe
> >> ??? the only prob I am having is the attachment isnt working properly ???
> >> is
> >> attached as a blank ??? not the original sent item ???
> >>
> >> I maybe totally wrong on how I am doing this... if you could help me id
> >> be
> >> very grateful...
> >>
> >> code i tried to do myself ??? doh !!!
> >>
> >> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
> >>
> >> Set objreply = Application.CreateItem(olMailItem)
> >> objreply.Subject = "Sent Items"
> >> objreply.BCC = "(E-Mail Removed)"
> >> objreply.Attachments.Add Item
> >> objreply.Display
> >>
> >> End Sub
> >>
> >>
> >> Regards
> >>
> >>
> >> "Sue Mosher [MVP-Outlook]" wrote:
> >>
> >> > You've made it too complicated. Item is the item being sent. Just Bcc
> >> > that
> >> > item:
> >> >
> >> > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
> >> > Boolean)
> >> > Set myBCC = Item.Recipients.Add("(E-Mail Removed)")
> >> > myBCC.Type = olBCC
> >> > End Sub
> >> >
> >> >
> >> > --
> >> > Sue Mosher, Outlook MVP
> >> > Author of
> >> > Microsoft Outlook Programming - Jumpstart for
> >> > Administrators, Power Users, and Developers
> >> > http://www.outlookcode.com/jumpstart.aspx
> >>

>
>
>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      12th Nov 2004
You're taking a step backwards. We've already discussed how ItemSend does
not meet your stated needs. What didn't you understand about using the
MAPIFolder.Items.ItemAdd event with the Sent Items folder, almost identical
to what you're already doing with the Inbox folder (except that in neither
case do you need to use Bcc, since you're creating a new message).

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Walshy" <(E-Mail Removed)> wrote in message
news:BC65BC25-C25B-4AB6-9A61-(E-Mail Removed)...
> Sue, thanks for your help... I have been trying for ages now, but no joy
> in
> getting the last bit to work !!! very frustrating !!! im not sure how to
> incorporate it to what I have already ?????
>
> so far all items that are unread when I log on are forwrded, items i
> recieve
> are forwarded its just the items I send... just cant get that working
> please
> could you look at what I have so far and tell me what I have to do or add
> to
> get this working !!! I would appreciate this SO much its the last bit I
> have
> to do !!!
>
> I just dont want the user to know that additional sent message has been
> sent...
>
> here is what I have so far (with help of other users on here !!!) I have
> this under thisoutlooksession:
>
> Public WithEvents myOlItems As Outlook.Items
>
> Private Sub Application_Startup()
>
> Dim obj As Object
> Dim objReply As MailItem
>
> For Each obj In
> Application.Session.GetDefaultFolder(olFolderInbox).Items
> If TypeOf obj Is Outlook.MailItem Then
> If obj.UnRead = True Then
> Set omail = obj
>
> Set objReply = Application.CreateItem(olMailItem)
> objReply.Subject = "My Subject Line"
> objReply.BCC = "(E-Mail Removed)"
> objReply.Attachments.Add omail
> objReply.DeleteAfterSubmit = True
> objReply.Send
> obj.UnRead = True
> End If
> End If
> Next
>
> Set myOlItems = Outlook.Session.GetDefaultFolder(olFolderInbox).Items
>
> End Sub
>
> Private Sub myOlItems_ItemAdd(ByVal Item As Object)
>
> Dim objItem As Object
> Dim objReply As Outlook.MailItem
>
> Set objReply = Application.CreateItem(olMailItem)
> objReply.Subject = "My Subject Line"
> objReply.BCC = "(E-Mail Removed)"
>
> If TypeName(Item) = "MailItem" Then
> objReply.Attachments.Add Item
> End If
>
> objReply.DeleteAfterSubmit = True
> objReply.Send
>
> Set objItem = Nothing
> Set objReply = Nothing
>
> Item.UnRead = True
>
> End Sub
>
>
> ' ****** THIS IS WHERE THE PROBLEM IS !!! Grrr *******
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
>
> Dim objMe As Recipient
>
> Set objMe = Item.Recipients.Add("(E-Mail Removed)")
> objMe.Type = olBCC
> objMe.Resolve
> Set objMe = Nothing
>
> End Sub
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to send ( e-mail containing 2 links ) from a small time e-mail software to a coporation's network e-mail personnel? Don Rago Microsoft Access 2 15th Aug 2009 07:24 PM
Windows-Mail - invitation not send by mail - meeting not send by mail Dirk Lehmann Windows Vista Mail 7 12th May 2008 08:16 PM
Send Mail Addres in Duplicate =?Utf-8?B?QmVybmE=?= Windows Vista Mail 2 27th May 2007 07:29 PM
Duplicate Emails with System.Web.Mail.SmtpMail.Send chuckdfoster Microsoft ASP .NET 3 1st Mar 2005 03:03 PM
receivde mail as duplicate all the time =?Utf-8?B?WUggTGVl?= Microsoft Outlook 1 12th Oct 2004 03:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:13 PM.