<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=313264217-02042003><FONT face=Arial color=#0000ff
size=2>Sure... I've been trying DoEvents but that hasn't worked. I've
checked the file size after the ".Attachments.Add" line and it shows 64B when
the file size is really 23KB.</FONT></SPAN></DIV>
<DIV><SPAN class=313264217-02042003><FONT face=Arial color=#0000ff size=2>
<BR>Public Function SendSafeEmail(SendTo As String, SendSubj As String,
_<BR>
SendBody As String, SendEdit As Boolean,
_<BR>
Optional SendCC As String,
_<BR>
Optional FilePath As String,
_<BR>
Optional strAttach As
String)<BR>
<BR> On Error GoTo ErrorHandler<BR>
<BR> Dim oMail As Object<BR> Dim oSpace As
Object<BR> Dim oFoldr As Object<BR> Dim
oItem As Object<BR> Dim oSafe As Object<BR>
Dim oRecip As Object<BR> Dim oDeliver As
Object<BR> Dim bolOpen As Boolean<BR> Dim
aryRecip() As String<BR> Dim intRecip As
Integer<BR> Dim aryFileList() As String<BR>
Dim intFilelist As Integer<BR> Dim strFileName As
String<BR> Dim lcv As Integer<BR> Dim
strSMTP As String<BR> <BR> bolOpen =
IsOutlookOpen<BR> <BR> Set oMail =
CreateObject("Outlook.Application")<BR> Set oSpace =
oMail.GetNamespace("MAPI")<BR> Set oFoldr =
oSpace.GetDefaultFolder(olFolderOutbox)<BR> Set oItem =
oMail.CreateItem(olMailItem)<BR> Set oSafe =
CreateObject("Redemption.SafeMailItem")<BR> oSafe.Item =
oItem</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=313264217-02042003><FONT face=Arial color=#0000ff
size=2> With
oSafe<BR> 'Add the TO
names<BR> If SendTo <>
vbNullString
Then<BR> If
InStr(1, SendTo, ";", vbTextCompare) > 0
Then<BR>
If Right(SendTo, 1) <> ";" Then SendTo = SendTo &
";"<BR>
aryRecip = Split(SendTo,
";")<BR>
intRecip = UBound(aryRecip) -
1<BR>
For lcv = 0 To
intRecip<BR>
.Recipients.Add
aryRecip(lcv)<BR>
Next
lcv<BR>
Erase
aryRecip<BR>
.Recipients.ResolveAll<BR>
Else<BR>
.Recipients.Add
SendTo<BR>
.Recipients.ResolveAll<BR>
End If<BR> End
If<BR> 'Add the CC
names<BR> If SendCC <>
vbNullString
Then<BR> If
InStr(1, SendCC, ";", vbTextCompare) > 0
Then<BR>
If Right(SendTo, 1) <> ";" Then SendTo = SendTo &
";"<BR>
aryRecip = Split(SendCC,
";")<BR>
intRecip = UBound(aryRecip) -
1<BR>
For lcv = 0 To
intRecip<BR>
.Recipients.Add
aryRecip(lcv)<BR>
Next
lcv<BR>
.Recipients.ResolveAll<BR>
Else<BR>
.Recipients.Add
SendCC<BR>
.Recipients.ResolveAll<BR>
End If<BR> End
If<BR> 'Add the rest of the
information<BR> .Subject =
SendSubj<BR> .Body =
SendBody<BR>
<BR> 'Add
Attachments<BR> If strAttach <>
vbNullString
Then<BR> If
InStr(1, strAttach, ";", vbTextCompare) > 0
Then<BR>
If Right(strAttach, 1) <> ";"
Then<BR>
strAttach = strAttach &
";"<BR>
End
If<BR>
aryFileList = Split(strAttach,
";")<BR>
intFilelist = UBound(aryFileList) -
1<BR>
For lcv = 0 To
intFilelist<BR>
strFileName = FilePath &
aryFileList(lcv)<BR>
.Attachments.Add
strFileName<BR>
DoEvents<BR>
Next lcv<BR>
End If<BR> End
If<BR>
DoEvents<BR>
<BR> If SendEdit = True
Then<BR>
DoEvents<BR>
.Save<BR>
DoEvents<BR>
.Display<BR>
Exit Function<BR>
Else<BR>
.Send<BR> End If<BR>
End With<BR> <BR> Set oDeliver =
CreateObject("Redemption.MAPIUtils")<BR>
oDeliver.DeliverNow<BR> oDeliver.Cleanup<BR>
<BR> If bolOpen = False
Then<BR>
oMail.Quit<BR> End If<BR>
<BR> Set oDeliver = Nothing<BR> Set oSafe =
Nothing<BR> Set oItem = Nothing<BR> Set
oFoldr = Nothing<BR> Set oSpace =
Nothing<BR> Set oMail = Nothing<BR>
<BR> Exit Function<BR>
<BR>ErrorHandler:<BR> Call HandleErrors(Err, strMyName,
"SendSafeEmail")<BR>End Function</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=313264217-02042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>John
Ruff<BR><B>Sent:</B> Wednesday, April 02, 2003 12:35 PM<BR><B>To:</B>
accessd@databaseadvisors.com<BR><B>Subject:</B> RE: [AccessD] Email attachment
problem<BR><BR></FONT></DIV>
<DIV><SPAN class=759293417-02042003><FONT face=Arial color=#0000ff size=2>Can
we see your email code?</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV> </DIV><!-- Converted from text/rtf format -->
<P><B><I><FONT face="Times New Roman" color=#0000ff size=4>John V.
Ruff</FONT><FONT face="Times New Roman" size=4> – </FONT><FONT
face="Times New Roman" color=#008080 size=4>The Eternal Optimist</FONT><FONT
face="Times New Roman" size=4></FONT> <FONT face=Wingdings color=#800080
size=4>J</FONT></I></B> <BR><I><FONT face="Times New Roman">Always Looking For
Contract Opportunities</FONT></I> </P>
<P><B><FONT face="Times New Roman" color=#000080 size=2>“Commit to the Lord
whatever you do,</FONT></B> <BR><B>
<FONT face="Times New Roman" color=#000080 size=2>and your plans will
succeed.” Proverbs 16:3</FONT></B> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>Mike and
Doris Manning<BR><B>Sent:</B> Wednesday, April 02, 2003 9:25
AM<BR><B>To:</B> accessd@databaseadvisors.com<BR><B>Subject:</B> [AccessD]
Email attachment problem<BR><BR></FONT></DIV>
<DIV><SPAN class=682442017-02042003><FONT face=Arial size=2>We have been
working on building our own internal PDF Document Solution using
PDF995. We can get the PDF files to create perfectly exactly where we
want them to. </FONT></SPAN><SPAN class=682442017-02042003><FONT
face=Arial size=2>The problem we now have is with our email code we built
using Redemption.</FONT></SPAN></DIV>
<DIV><SPAN class=682442017-02042003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=682442017-02042003><FONT face=Arial size=2>The PDF original
is 23KB but only 64B of that is making it to the email as an
attachment.</FONT></SPAN></DIV>
<DIV><SPAN class=682442017-02042003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=682442017-02042003><FONT face=Arial size=2>Does anybody
have any thoughts on how we could slow the code down so that the entire
attachment would be added? I'm trying to avoid using a message box, if
at all possible.</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV>
<DIV align=left><FONT face=Arial size=2>Doris Manning</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Database Administrator</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Hargrove Inc.</FONT></DIV>
<DIV align=left><FONT face=Arial color=#0000ff
size=2><U>www.hargroveinc.com</U></FONT></DIV></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>