Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: "thomas" <nomail>
- Date: Fri, 13 Feb 2009 22:37:12 +0100
I think I found out => .BodyFormat = olFormatPlain instead of .BodyFormat =
olFormatHTML , but since the variable "corps" contains html tags there are
big changes to make and it may not be worth
I think I will just exit the procedure if the editor is mail unless I find a
way to get rid of these tags
I had an other problem : When I send an html mail with my code to someone
that uses word editor, if my mail is transferred or answered, the original
body of my mail is lost
Thanks
"thomas" <nomail> a écrit dans le message de groupe de discussion :
uz6aXuhjJHA.4976@xxxxxxxxxxxxxxxxxxxxxxx
oh thanks
i should have seen it
detection works fine
but what should be the code when oInspector.IsWordMail ? where can i find
examples ?
Thanks
"Ken Slovak - [MVP - Outlook]" <kenslovak@xxxxxxxx> a écrit dans le message
de groupe de discussion : ODZQJ0ejJHA.2460@xxxxxxxxxxxxxxxxxxxxxxx
The names of the Inspector variable aren't the same on these lines:
Set olInspector = MonMail.GetInspector
If oInspector.IsWordMail Then ' The 424 error is here
Use the same variable name in both lines.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"thomas" <nomail> wrote in message
news:eRA%234QVjJHA.6124@xxxxxxxxxxxxxxxxxxxxxxx
My code is :
Private Function EnvoiMail_HTML(Adresse As String, Objet As String, Corps
As
String, Optional Pièce As String, Optional Cc As String, Optional Bcc As
String, Optional Envoyer_Mail As Boolean)
Dim MonAppliOutlook As Outlook.Application
Dim MonMail As Outlook.MailItem
Dim MaPièce As Outlook.Attachments
Dim olInspector As Outlook.Inspector
Set MonAppliOutlook = CreateObject("Outlook.Application")
Set MonMail = MonAppliOutlook.CreateItem(olMailItem)
Set olInspector = MonMail.GetInspector
If oInspector.IsWordMail Then ' The 424 error is here
' is WordMail 'Just for test
Else
' no WordMail 'Just for test
End If
On Error Resume Next
With MonMail
If Affichage = True Then .Display Else
.GetInspector.CommandBars.Item("Insert").Controls("Signature").Controls(1).Execute
.To = Adresse
If Not IsNull(Cc) Then .Cc = Cc
If Not IsNull(Bcc) Then .Bcc = Bcc
.Subject = Objet
If Not IsNull(Pièce) Then
Set MaPièce = .Attachments
T = Split(Pièce, ";")
For i = 0 To UBound(T)
MaPièce.Add T(i), olByValue
Next i
End If
.BodyFormat = olFormatHTML
.HTMLBody = Corps & .HTMLBody
If Envoyer_Mail = True Then .Send
End With
Set MonAppliOutlook = Nothing
Set MonMail = Nothing
End Function
"thomas" <nomail> a écrit dans le message de groupe de discussion :
Oikn53IjJHA.5588@xxxxxxxxxxxxxxxxxxxxxxx
Thanks but i get a 424 error on "If oInspector.IsWordMail Then"
.
- Follow-Ups:
- Re: Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: Ken Slovak - [MVP - Outlook]
- Re: Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- References:
- Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: thomas
- Re: Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: Ken Slovak - [MVP - Outlook]
- Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: thomas
- Re: Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: Ken Slovak - [MVP - Outlook]
- Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: thomas
- Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: thomas
- Re: Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: Ken Slovak - [MVP - Outlook]
- Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- From: thomas
- Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- Prev by Date: Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- Next by Date: Running Import Data from Access
- Previous by thread: Re : Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- Next by thread: Re: Outlook 2003 - Turn Word on or off as e-mail editor or viewer
- Index(es):
Relevant Pages
|