Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / September 2003

Tip: Looking for answers? Try searching our database.

OL Redemption - Attachments Invisible

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Vest - 18 Sep 2003 22:46 GMT
Any Outlook Redemption Experts out there???
(I hear the expert hangs out at this news group.)

Using Outlook Redemption with Windows 2000, Outlook 2002 / Exchange
Server.

I use the following code to attach files to the email. I then display
the email for the user to edit and click the SEND button.

Unfortunately - the displayed email does not show the attachments. So,
the user gets concerned thinking the requested files are not attached.

Actually - the attachements are there, but the user just can't see
them. When the user presses SEND, the attachements show up in the
recpient's mailbox.

THE PROBLEM IS THAT THE ATTACHED FILES CANNOT BE SEEN WHEN THE EMAIL
IS DISPLAYED BEFORE SENDING.

Thanks For Your Help!!

Attached Code:
  Set OL_app = CreateObject("Outlook.Application")
  Set OL_item = OL_app.CreateItem(0) 'Create a new message
  Set NameSpace = OL_app.GetNamespace("MAPI")
  NameSpace.Logon

'Create an instance of Redemption.safeMailItem
  Set safeItem = CreateObject("Redemption.safeMailItem")
  safeItem.Item = OL_item 'set Item property
 
' add TO list to email
  For i = LBound(toList) To UBound(toList)
     If StrComp(toList(i), "", vbTextCompare) <> 0 Then Set safeRecip
= safeItem.Recipients.Add(toList(i))
  Next i
 
' add CC list to email
  For i = LBound(ccList) To UBound(ccList)
       If StrComp(toList(i), "", vbTextCompare) <> 0 Then
           Set ccRecip = safeItem.Recipients.Add(ccList(i))
           ccRecip.Type = olCC
       End If
  Next i
 
' resolve distribution
  safeItem.Recipients.ResolveAll

' add attachement files to email
  For i = LBound(attList) To UBound(attList)
     If StrComp(attList(i), "", vbTextCompare) <> 0 Then
safeItem.Attachments.Add (attList(i))
  Next i
 
' add subject header to email
  safeItem.subject = subject
 
' add body message to email
  safeItem.Body = body_msg
 
  safeItem.Display
Dmitry Streblechenko - 19 Sep 2003 03:44 GMT
Outlook cannot see any modifications made through Extended MAPi until you
dereference and reopen the message.
Since adding attachments is not blocked by the Outlook Object Model, replace
the line
safeItem.Attachments.Add (attList(i))
with
OL_item.Attachments.Add (attList(i))

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

> Any Outlook Redemption Experts out there???
> (I hear the expert hangs out at this news group.)
[quoted text clipped - 57 lines]
>
>    safeItem.Display
Mike Vest - 19 Sep 2003 17:29 GMT
Thanks! Works great and so does Redemption - bravo work.

My secretary will be licensing a copy asap.

I will be securing it via the suggestions on your website. If there
are any issues, I'll post.

-Mike
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.