send mail using .oft template

L

Ludo

Hi all,

I use some code i found on the net to send an e-mail using a
Outlook.oft template.
This code use the .htmbody property and the template has a .JPG
picture on top of the sheet.

If i send a mail using this template, when opened with Outlook or
Mozilla, the picture does't show up!
When opening with Outlook Express, it seems to work.
I found also some information abouth Outlook that you can disable
pictures in the received mails, but i would expect, because it's a
template, that the picture will remain in the mail and always show up,
regardless of this particular setting.
I consider a template as a kind of pre-printed sheet where i add the
nessesarry info (text + attachment) to it, so the template is for me a
pre-printed sheet with a .JPG picture on it.

Is there a way (work around) to avoid this problem, so that the
picture allways show up?
If so, what's the code i would need to use?

I'm creating the Outlook message from within a Excell VBA utility.
The used picture contains the legal minimum needed information
(address of seat of the organisation + official registration number).
This is the minimum information we need to use when we send a mail to
"customers" so that they are aware of what kind of organisation they
deal with.

Where can i find related information of programming Outlook in the
Microsoft Knowledge database? I have no experience at all to program
Outlook with VBA.

I'm using Outlook 2000 / Excell 2000 and still Windows 98 SE.

Any help is welcome.
Regards,
Ludo
 
L

Ludo

Hi,

I can't use the mentioned CDO 1.21 library because i don't know if
it's installed on my PC (and also to the other users pc), so what file
are i'm looking for? Note that i still run Windows 98 SE and that the
CDO library is perhaps only available with more recent operating
systems (2000, XP, Vista).

Now i use following code from within Excel:

Sub SendOutlook()

Dim MailTo1 As String
Dim MailTo2 As String
Const sMsg2 = "Send methode = Outlook"

Message
szSection = "Expence"
szKey = "Mail Address1"
MailTo1 = GetIniKey(szFile, szSection, szKey)
szKey = "Mail Address2"
MailTo2 = GetIniKey(szFile, szSection, szKey)

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItemFromTemplate(ThisWorkbook.Path &
"\Belug vzw.oft")
With myItem
.To = MailTo1
If MailTo2 <> "0" Then
.CC = MailTo2
End If
.Subject = wbName
.HTMLBody = .HTMLBody & "<BR>" & sMsg & "<BR>" & sMsg2 &
"<BR>" & " Date / Time: " & Now
.Attachments.Add wbPathName
.Send 'display
End With
'
Set myItem = Nothing
Set myOlApp = Nothing
End Sub

so as you can see, i use a .oft template where the picture is placed,
but there are still cases that the picture i placed in the template
(.oft) doesn't show up on the receivers side. One of those persons use
Mozilla, and there the picture from the template is gone.
They claim also that the send atachment isn't there, but i receive
them with Outlook 2000.
Weird problem!

Anyone out there who can help me further?
I'm a real dummy in programming VBA code for Outlook.

Ludo
 
E

Eric Legault [MVP - Outlook]

CDO is not distributed with Windows, but is actually an optional install in
Microsoft Office.

I'm not sure exactly why Mozilla users aren't seeing your embedded image.
Are they receiving any winmail.dat attachments by chance? That usually
indicates your message went out in Rich Text format, which most non-Outlook
e-mail clients choke on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top