View Single Post
  #4  
Old November 19th 07, 09:26 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default send mail using .oft template

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.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Ludo" wrote:

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

On 13 nov, 20:37, Eric Legault [MVP - Outlook]
wrote:
It sounds like you are attaching the image to the e-mail manually, as in
adding it to the attachments collection. Here's some sample code that shows
how to do it:

http://www.outlookcode.com/d/code/htmlimg.htm

The rest of that site is also a greate resource for Outlook development.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:http://www.collaborativeinnovations.ca
Blog:http://blogs.officezealot.com/legault/



SNIP



Ads