![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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/ "Ludo" wrote: 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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating an 'internal mail only' template | [email protected] | Outlook - General Queries | 1 | July 11th 07 01:31 AM |
Creating custom template to use as corp New mail message template | Lars JJ | Outlook - Using Forms | 8 | May 15th 07 09:32 AM |
Cannot use my company logo in `send letter to contact' word template | BT-Steve | Outlook - Fax Functions | 3 | March 2nd 07 09:36 PM |
Mail message from Word template | S. Diego | Outlook - General Queries | 1 | January 30th 07 11:22 PM |
How do I create an e-mail template that is filled out by a form? | Who8myrice | Outlook - Using Forms | 12 | June 28th 06 09:28 PM |