T
Tyler
Sorry if this question displays twice, it gave me an internal server
error.
I am having some success with Attachments and images embedded in the
message but am not having any luck when both are used in one message.
How do I determine what type of attachment it is (embedded or a file)?
I have tried using the Fields(&H3712001E) to see if it has a cid but
can't get that to work and the type property of the attachment is
always 1.
set fso = CreateObject("Scripting.FileSystemObject")
set fldTemp = fso.GetSpecialFolder(2)
strPath = fldTemp.Path & "\"
For i = 1 To objAttachments.Count
strFile = strPath & objAttachments(i).FileName
objAttachments(i).SaveAsFile strFile
set Attach = SafeItem.Attachments.Add(strFile, , ,
objAttachments(i).DisplayName)
Attach.Fields(&H370E001E) = "image/jpeg"
Attach.Fields(&H3712001E) = "myidnet"
SafeItem.HTMLBody = REPLACE(SafeItem.HTMLBody,
MID(SafeItem.HTMLBody, Instr(SafeItem.HTMLBody, "cid:"), 27),
"cid:myidnet")
fso.DeleteFile strFile
Next
This code works when I only have one embedded image and no
attachments, it delivers the message with the embedded image not an
attachment. Is it possible to have more than one embedded image in a
message? The attachment count returns a 1 for the attachment count if
more than one, so not sure if it is possible.
error.
I am having some success with Attachments and images embedded in the
message but am not having any luck when both are used in one message.
How do I determine what type of attachment it is (embedded or a file)?
I have tried using the Fields(&H3712001E) to see if it has a cid but
can't get that to work and the type property of the attachment is
always 1.
set fso = CreateObject("Scripting.FileSystemObject")
set fldTemp = fso.GetSpecialFolder(2)
strPath = fldTemp.Path & "\"
For i = 1 To objAttachments.Count
strFile = strPath & objAttachments(i).FileName
objAttachments(i).SaveAsFile strFile
set Attach = SafeItem.Attachments.Add(strFile, , ,
objAttachments(i).DisplayName)
Attach.Fields(&H370E001E) = "image/jpeg"
Attach.Fields(&H3712001E) = "myidnet"
SafeItem.HTMLBody = REPLACE(SafeItem.HTMLBody,
MID(SafeItem.HTMLBody, Instr(SafeItem.HTMLBody, "cid:"), 27),
"cid:myidnet")
fso.DeleteFile strFile
Next
This code works when I only have one embedded image and no
attachments, it delivers the message with the embedded image not an
attachment. Is it possible to have more than one embedded image in a
message? The attachment count returns a 1 for the attachment count if
more than one, so not sure if it is possible.