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

email using redemption



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 23rd 06, 01:49 AM posted to microsoft.public.outlook.program_vba
Richard
external usenet poster
 
Posts: 14
Default email using redemption

Hi

I am using redemption to forward emails.

When I do not display the item, it will send without the body(message). But
if I display the item first, then close it and send, everything is sent
including the message.

Is there a way around this. It would be nice if there were no window opening
and closing when the code is running.

Many thanks in advance
Richard

Part of code:

Set myFolder = myNameSpace.GetDefaultFolder(olFolderDrafts)
Set myItem = myFolder.Items
Set Utils = CreateObject("Redemption.MAPIUtils")

qryResults.MoveFirst

Do Until qryResults.EOF

If a Count Then

Set myTempItem = CreateObject("Redemption.SafeMailItem")
Set FWDItem = myItem.Item(1).Forward

FWDItem.to = qryResults!EMAIL
FWDItem.Display 'if I don't display, the message is sent
without message.
FWDItem.Close olSave
DoEvents
FWDItem.DeleteAfterSubmit = True

myTempItem.Item = FWDItem
myTempItem.Send




  #2  
Old March 23rd 06, 04:48 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default email using redemption

Instead of displaying the message, save it first (FWDItem.Save).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi

I am using redemption to forward emails.

When I do not display the item, it will send without the body(message).
But
if I display the item first, then close it and send, everything is sent
including the message.

Is there a way around this. It would be nice if there were no window
opening
and closing when the code is running.

Many thanks in advance
Richard

Part of code:

Set myFolder = myNameSpace.GetDefaultFolder(olFolderDrafts)
Set myItem = myFolder.Items
Set Utils = CreateObject("Redemption.MAPIUtils")

qryResults.MoveFirst

Do Until qryResults.EOF

If a Count Then

Set myTempItem = CreateObject("Redemption.SafeMailItem")
Set FWDItem = myItem.Item(1).Forward

FWDItem.to = qryResults!EMAIL
FWDItem.Display 'if I don't display, the message is sent
without message.
FWDItem.Close olSave
DoEvents
FWDItem.DeleteAfterSubmit = True

myTempItem.Item = FWDItem
myTempItem.Send






  #3  
Old March 23rd 06, 05:39 AM posted to microsoft.public.outlook.program_vba
Richard
external usenet poster
 
Posts: 14
Default email using redemption

Hi Dmitry

I tried it but resulted with an empty message.

Regards
Richard

"Dmitry Streblechenko" wrote in message
...
Instead of displaying the message, save it first (FWDItem.Save).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi

I am using redemption to forward emails.

When I do not display the item, it will send without the body(message).
But
if I display the item first, then close it and send, everything is sent
including the message.

Is there a way around this. It would be nice if there were no window
opening
and closing when the code is running.

Many thanks in advance
Richard

Part of code:

Set myFolder = myNameSpace.GetDefaultFolder(olFolderDrafts)
Set myItem = myFolder.Items
Set Utils = CreateObject("Redemption.MAPIUtils")

qryResults.MoveFirst

Do Until qryResults.EOF

If a Count Then

Set myTempItem = CreateObject("Redemption.SafeMailItem")
Set FWDItem = myItem.Item(1).Forward

FWDItem.to = qryResults!EMAIL
FWDItem.Display 'if I don't display, the message is

sent
without message.
FWDItem.Close olSave
DoEvents
FWDItem.DeleteAfterSubmit = True

myTempItem.Item = FWDItem
myTempItem.Send








  #4  
Old March 23rd 06, 06:30 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default email using redemption

What happens if you display the message body (MsgBox myTempItem.Body) before
sending it?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi Dmitry

I tried it but resulted with an empty message.

Regards
Richard

"Dmitry Streblechenko" wrote in message
...
Instead of displaying the message, save it first (FWDItem.Save).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi

I am using redemption to forward emails.

When I do not display the item, it will send without the body(message).
But
if I display the item first, then close it and send, everything is sent
including the message.

Is there a way around this. It would be nice if there were no window
opening
and closing when the code is running.

Many thanks in advance
Richard

Part of code:

Set myFolder = myNameSpace.GetDefaultFolder(olFolderDrafts)
Set myItem = myFolder.Items
Set Utils = CreateObject("Redemption.MAPIUtils")

qryResults.MoveFirst

Do Until qryResults.EOF

If a Count Then

Set myTempItem = CreateObject("Redemption.SafeMailItem")
Set FWDItem = myItem.Item(1).Forward

FWDItem.to = qryResults!EMAIL
FWDItem.Display 'if I don't display, the message is

sent
without message.
FWDItem.Close olSave
DoEvents
FWDItem.DeleteAfterSubmit = True

myTempItem.Item = FWDItem
myTempItem.Send










  #5  
Old March 23rd 06, 07:23 AM posted to microsoft.public.outlook.program_vba
Richard
external usenet poster
 
Posts: 14
Default email using redemption

I get this

---------------------------
WB
---------------------------
-832438263 Array index out of bounds.
---------------------------
OK
---------------------------



"Dmitry Streblechenko" wrote in message
...
What happens if you display the message body (MsgBox myTempItem.Body)

before
sending it?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi Dmitry

I tried it but resulted with an empty message.

Regards
Richard

"Dmitry Streblechenko" wrote in message
...
Instead of displaying the message, save it first (FWDItem.Save).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi

I am using redemption to forward emails.

When I do not display the item, it will send without the

body(message).
But
if I display the item first, then close it and send, everything is

sent
including the message.

Is there a way around this. It would be nice if there were no window
opening
and closing when the code is running.

Many thanks in advance
Richard

Part of code:

Set myFolder = myNameSpace.GetDefaultFolder(olFolderDrafts)
Set myItem = myFolder.Items
Set Utils = CreateObject("Redemption.MAPIUtils")

qryResults.MoveFirst

Do Until qryResults.EOF

If a Count Then

Set myTempItem = CreateObject("Redemption.SafeMailItem")
Set FWDItem = myItem.Item(1).Forward

FWDItem.to = qryResults!EMAIL
FWDItem.Display 'if I don't display, the message is

sent
without message.
FWDItem.Close olSave
DoEvents
FWDItem.DeleteAfterSubmit = True

myTempItem.Item = FWDItem
myTempItem.Send












  #6  
Old March 23rd 06, 07:35 AM posted to microsoft.public.outlook.program_vba
Richard
external usenet poster
 
Posts: 14
Default email using redemption

Hi Dmitry

I think I know where the problem is..

If I forward a new email (I forward the item from inbox to drafts), the
message is empty, but if I drag an old email (i.e. I drag and drop from
inbox to drafts) it works okay.

Anyway sorry for the previous post, there wasn't any item in the drafts
folder.

How do I forward the item, and make it show in the mytempitem.body?

Richard


"Dmitry Streblechenko" wrote in message
...
What happens if you display the message body (MsgBox myTempItem.Body)

before
sending it?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi Dmitry

I tried it but resulted with an empty message.

Regards
Richard

"Dmitry Streblechenko" wrote in message
...
Instead of displaying the message, save it first (FWDItem.Save).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi

I am using redemption to forward emails.

When I do not display the item, it will send without the

body(message).
But
if I display the item first, then close it and send, everything is

sent
including the message.

Is there a way around this. It would be nice if there were no window
opening
and closing when the code is running.

Many thanks in advance
Richard

Part of code:

Set myFolder = myNameSpace.GetDefaultFolder(olFolderDrafts)
Set myItem = myFolder.Items
Set Utils = CreateObject("Redemption.MAPIUtils")

qryResults.MoveFirst

Do Until qryResults.EOF

If a Count Then

Set myTempItem = CreateObject("Redemption.SafeMailItem")
Set FWDItem = myItem.Item(1).Forward

FWDItem.to = qryResults!EMAIL
FWDItem.Display 'if I don't display, the message is

sent
without message.
FWDItem.Close olSave
DoEvents
FWDItem.DeleteAfterSubmit = True

myTempItem.Item = FWDItem
myTempItem.Send












  #7  
Old March 23rd 06, 05:21 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default email using redemption

Depends on where the original message to be forwarded comes from. How do you
make a decision which message needs to be forwarded?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi Dmitry

I think I know where the problem is..

If I forward a new email (I forward the item from inbox to drafts), the
message is empty, but if I drag an old email (i.e. I drag and drop from
inbox to drafts) it works okay.

Anyway sorry for the previous post, there wasn't any item in the drafts
folder.

How do I forward the item, and make it show in the mytempitem.body?

Richard


"Dmitry Streblechenko" wrote in message
...
What happens if you display the message body (MsgBox myTempItem.Body)

before
sending it?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi Dmitry

I tried it but resulted with an empty message.

Regards
Richard

"Dmitry Streblechenko" wrote in message
...
Instead of displaying the message, save it first (FWDItem.Save).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Richard" wrote in message
...
Hi

I am using redemption to forward emails.

When I do not display the item, it will send without the

body(message).
But
if I display the item first, then close it and send, everything is

sent
including the message.

Is there a way around this. It would be nice if there were no window
opening
and closing when the code is running.

Many thanks in advance
Richard

Part of code:

Set myFolder = myNameSpace.GetDefaultFolder(olFolderDrafts)
Set myItem = myFolder.Items
Set Utils = CreateObject("Redemption.MAPIUtils")

qryResults.MoveFirst

Do Until qryResults.EOF

If a Count Then

Set myTempItem = CreateObject("Redemption.SafeMailItem")
Set FWDItem = myItem.Item(1).Forward

FWDItem.to = qryResults!EMAIL
FWDItem.Display 'if I don't display, the message is
sent
without message.
FWDItem.Close olSave
DoEvents
FWDItem.DeleteAfterSubmit = True

myTempItem.Item = FWDItem
myTempItem.Send














 




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
Send email using redemption Richard Outlook - General Queries 3 March 23rd 06 01:44 AM
Redemption Christoph Add-ins for Outlook 5 March 6th 06 03:26 PM
Convert to Redemption ??? John DOE Outlook and VBA 2 February 13th 06 06:22 AM
Crash with Redemption Lars Ibsen Outlook and VBA 4 February 13th 06 05:29 AM
Redemption MAPITable Dmitry Streblechenko Add-ins for Outlook 1 January 12th 06 04:09 AM


All times are GMT +1. The time now is 12:22 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.