我正在尝试使用 vba 代码编辑 OFT
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
这是我收到错误 287 的地方(我的系统是法语)
.HTMLBody = Replace(oMail.HTMLBody, strFind, strNew)
有人有线索吗?