帮忙!不知道该如何解决的代理问题
Addin: Agent 'wMemoOpen' error message : Type mismatchwMemoOpen代理老是报这样的错误,不知道该如何解决? --------------------编程问答-------------------- 那里的类型错误,发代码SHOW! --------------------编程问答-------------------- 你的代理里面有行代码出错了,类型不匹配,导致赋值出错 --------------------编程问答-------------------- Sub Initialize
Call wInstantiateObjectVariables
Dim query_string As String
query_string = note.getitemvalue("query_string")(0)
If ((Not(note.hasitem("useApplet"))) And (Not(note.Isnewnote))) Then
Call note.replaceitemvalue("useApplet", "True")
End If
If (note.GetItemValue("textApplet")(0)="True") And _
((Not(Instr(query_string, "&ParentUNID") >= 1)) And (Not(Instr(query_string, "&useApplet") >= 1)))Then
Call note.replaceitemvalue("useApplet", "False")
If note.hasItem("Body") Then
Dim rtiEdit As Variant
Dim rtiTmpEdit As New notesrichtextitem( note, "BodyTemp")
Set rtiEdit = note.getFirstItem("Body")
Call rtiTmpEdit.appendRTItem( rtiEdit )
Call note.removeItem( "Body" )
Dim rtiNewBodyEdit As New notesrichtextitem( note, "wBody" )
Call rtiNewBodyEdit.appendRTItem(rtiTmpEdit)
Call note.removeItem( "BodyTemp")
End If
End If
If Instr(query_string, "&useApplet") Or (note.getItemvalue("$AutoEditMode")(0)="1") Then
Call note.replaceitemvalue("useApplet", "True")
If (note.getitemvalue("SendTo")(0)= "") And (note.getitemvalue("EnterSendTo")(0)<>"") Then
Call note.replaceitemvalue("SendTo", note.getitemvalue("EnterSendTo")(0))
End If
End If
strUNID = ""
strUNID = Mid(query_string, Instr(query_string, "=")+1, 32)
If (strUNID <> "")Then
Call note.replaceitemvalue("pdocID", strUNID)
End If
If (note.getitemvalue("docID")(0)="") And (Not(note.isnewnote)) Then
Call note.replaceitemvalue("docID", note.universalid)
End If
If Instr(query_string, "&To=") Then
Call PopulateSendTo()
End If
If Instr(query_string, "&ReturnView=") Then
Call note.replaceitemvalue("ReturnView", Strrightback(query_string, "&ReturnView="))
End If
'we are doing a forward
If Instr(query_string, "Forward") Then
On Error Resume Next
strUNID = Mid(query_string, Instr(query_string, "=")+1, 32)
Set noteReferred = db.getdocumentbyUNID(strUNID)
On Error Goto ErrorRoutine
If noteReferred Is Nothing Then
note.AbortGracefully = "1"
Exit Sub
End If
note.AbortGracefully = "0"
Call note.replaceitemvalue("Websubject",noteReferred.getitemvalue("subject")(0))
Call note.replaceitemvalue("subject",noteReferred.getitemvalue("subject")(0))
note.sendto=""
note.copyto=""
note.blindcopyto=""
If (note.hasItem("Body")) Then
Dim rtiForward As Variant
Dim rtiTmpForward As New notesrichtextitem( note, "BodyTempForward")
Set rtiForward = note.getFirstItem("Body")
If (note.isNewNote And wGetCalendarProfile) Then
If (profile.getitemvalue("EnableSignature")(0) = "1") Then
rtiTmpForward.appendText( profile.getitemvalue("Signature_1")(0))
End If
End If
Call rtiTmpForward.appendRTItem( rtiForward )
Call note.removeItem( "Body" )
Dim rtiNewBodyForward As New notesrichtextitem( note, "Body" )
Call rtiNewBodyForward.appendRTItem(rtiTmpForward)
Call note.removeItem( "BodyTempForward")
End If
End If
Call wReturnReceipt( note )
If Instr(query_string,"All") Then
strUNID = Mid(query_string, Instr(query_string, "=")+1, 32)
Set noteReferred = db.getdocumentbyUNID(strUNID)
If Not(noteReferred Is Nothing) Then
Call agentlog.logaction("Doing Reply to All")
Call MEMOReplytoAll(note)
If Instr(query_string,"ParentUNID")=0 Then
Call note.replaceitemvalue("websubject",note.subject(0)+" "+notereferred.subject(0))
End If
End If
End If
If (note.isNewNote And wGetCalendarProfile) Then
If (profile.getitemvalue("EnableSignature")(0) = "1") Then
If Not(Instr(query_string, "Forward") >=1)Then
Dim rtiOrig As Variant
Dim rtiTmp As New notesrichtextitem( note, "BodyTemp")
Set rtiOrig = note.getFirstItem("Body")
rtiTmp.appendText( profile.getitemvalue("Signature_1")(0))
Call rtiTmp.appendRTItem( rtiOrig )
Call note.removeItem( "Body" )
If ((Instr(query_string, "&useApplet")) Or ((Instr(query_string, "&ParentUNID") >= 1))) _
And (Not(Instr(query_string, "&reply") >=1)) Then
Dim rtiNewBody As New notesrichtextitem( note, "Body" )
Call rtiNewBody.appendRTItem(rtiTmp)
Else
Dim rtiNewwBody As New notesrichtextitem( note, "wBody" )
Call rtiNewwBody.appendRTItem(rtiTmp)
End If
Call note.removeItem( "BodyTemp")
End If
End If
End If
Exit Sub
ErrorRoutine:
Messagebox Error & " (wMemoOpen)"
Exit Sub
End Sub
这个就是那个wMemoOpen代理,帮忙看看哪里有类型不匹配? --------------------编程问答-------------------- wMemoOpen代理该怎么看呀?帮帮忙呀!急!! --------------------编程问答-------------------- 加上这个看看是那行出错了
On Error Goto err
....代码.....
err:
Msgbox "Error:"+Error()+",at line:"+Cstr(Erl()) --------------------编程问答-------------------- 经多方检查是用户打开某邮件时候出现的,为什么会出现wMemoOpen代理报错???? --------------------编程问答-------------------- 用5F的办法调试下 --------------------编程问答-------------------- 5F?能说详细些吗?新手初学,不要说得那么深奥 --------------------编程问答-------------------- On Error Goto err
放在代码代码第一行,
exit sub
err:
Msgbox "Error:"+Error()+",at line:"+Cstr(Erl())
放在代码最后三行 --------------------编程问答-------------------- 建议楼主先把Notes的一些基本功能搞定,比如调试\跟踪,这样可以为后面的学习省很多力.
补充:企业软件 , Lotus