I'm trying to edit an OFT with vba code
Private Sub CommandButton1_Click()
template = "T:\Coordination des interventions\Coordination des changements\Communications\Interruption de service planifiée - Environnements applicatifs Oracle - Copie.oft"
strNew = InputBox("Jour de la semaine")
strFind = "%>JourSemaine<%"
Dim oApp As Object, oMail As Object
Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.CreateItemFromTemplate(template)
With oMail
'strFind = "Code:"
'strNew = "Code:" & Cells(4, 3) ' for example
.HTMLBody = Replace(oMail.HTMLBody, strFind, strNew)
.Display
End With
End Sub
This is where I got an error 287 (my systeme is in french)
.HTMLBody = Replace(oMail.HTMLBody, strFind, strNew)
Anybody have clue?
Make sure that you set up a well-formed HTML markup. For example:
Calling the Replace method you may replace some HTML tags as well.