PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming bcc forwarding messages

Reply

bcc forwarding messages

 
Thread Tools Rate Thread
Old 04-11-2004, 03:50 PM   #1
=?Utf-8?B?V2Fsc2h5?=
Guest
 
Posts: n/a
Default bcc forwarding messages


Hi I have used this code to bcc any messages I send to an additional address.

the problem is the actual text in the email itself (the mesage itself : hi
how are you etc) is not being forwarded just a blank message ??? can anyone
help ??? code is as follows :

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

Set myForward = Item.Forward
Set myBCC = myForward.Recipients.Add("michael.walsh@orbit.org.uk")
myBCC.Type = olBCC
myForward.Send

End Sub

please can someone help

Thanks
  Reply With Quote
Old 04-11-2004, 04:40 PM   #2
=?Utf-8?B?V2Fsc2h5?=
Guest
 
Posts: n/a
Default RE: bcc forwarding messages

I got this code from an earlier posting (sent/recieved mails forward to
additional address) maybe it would work but I am unsure as I am not sure
where to put it in Visual Basic ???

I tried putting it under: Project1/microsoft outlook
objects/Thisoutlooksession under general but dont work

tried under applications this works but sends a blank email to address
specified also have to change private sub name so dont think its ment to go
there ?

also tried on a seperate module but dont work ??? Can someone please help
maybe there is more to the code or something to activate it on send or
recieve ???

code is as follows :

Private Sub myOlItems_ItemAdd(ByVal Item As Object)

If TypeName(Item) = "MailItem" Then
' Forward the item just received
Set myForward = Item.Forward

' Address the message
Set myBCC = myForward.Recipients.Add("'email address to send copy
to")
myBCC.Type = olBCC

'Don't save another copy
myForward.DeleteAfterSubmit = True
' Send it
myForward.Send


End If



End Sub




"Walshy" wrote:

> Hi I have used this code to bcc any messages I send to an additional address.
>
> the problem is the actual text in the email itself (the mesage itself : hi
> how are you etc) is not being forwarded just a blank message ??? can anyone
> help ??? code is as follows :
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
>
> Set myForward = Item.Forward
> Set myBCC = myForward.Recipients.Add("michael.walsh@orbit.org.uk")
> myBCC.Type = olBCC
> myForward.Send
>
> End Sub
>
> please can someone help
>
> Thanks

  Reply With Quote
Old 08-11-2004, 04:16 PM   #3
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: bcc forwarding messages

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("michael.walsh@orbit.org.uk")
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


"Walshy" <Walshy@discussions.microsoft.com> wrote in message
news:8AF5FE56-0878-4779-BF41-E262E0E47CEB@microsoft.com...
> Hi I have used this code to bcc any messages I send to an additional
> address.
>
> the problem is the actual text in the email itself (the mesage itself : hi
> how are you etc) is not being forwarded just a blank message ??? can
> anyone
> help ??? code is as follows :
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
>
> Set myForward = Item.Forward
> Set myBCC = myForward.Recipients.Add("michael.walsh@orbit.org.uk")
> myBCC.Type = olBCC
> myForward.Send
>
> End Sub
>
> please can someone help
>
> Thanks



  Reply With Quote
Old 10-11-2004, 03:36 PM   #4
=?Utf-8?B?V2Fsc2h5?=
Guest
 
Posts: n/a
Default Re: bcc forwarding messages

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 "michael.walsh@orbit.org.uk"... 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 = "michael.walsh@orbit.org.uk"
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("michael.walsh@orbit.org.uk")
> 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
>
>
> "Walshy" <Walshy@discussions.microsoft.com> wrote in message
> news:8AF5FE56-0878-4779-BF41-E262E0E47CEB@microsoft.com...
> > Hi I have used this code to bcc any messages I send to an additional
> > address.
> >
> > the problem is the actual text in the email itself (the mesage itself : hi
> > how are you etc) is not being forwarded just a blank message ??? can
> > anyone
> > help ??? code is as follows :
> >
> > Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
> >
> > Set myForward = Item.Forward
> > Set myBCC = myForward.Recipients.Add("michael.walsh@orbit.org.uk")
> > myBCC.Type = olBCC
> > myForward.Send
> >
> > End Sub
> >
> > please can someone help
> >
> > Thanks

>
>
>

  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

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