On Error GoTo ErrorMsg
Dim s As New NotesSession
Dim db As NotesDatabase
Set db = s.Currentdatabase
Dim doc As NotesDocument
Set doc = s.DocumentContext
'...Get SOAP in...
Dim username As New NotesName(s.Username)
Dim JsonStr As String
JsonStr= doc.GetItemValue("Request_content")(0)
MsgBox "JsonInvFile?OpenAgent "
Dim temp As Variant
temp=Evaluate(|@Attachments|,doc)
If temp(0) = 0 Then
MsgBox "無附件"
Else
MsgBox "有 " +CStr(temp(0)) + "份"
End If
Dim newDoc As NotesDocument
Set newDoc = New NotesDocument(db)
' Call newDoc.Copyallitems(doc)
Call doc.CopyAllItems( newDoc, True )
newDoc.Form = "inv"
newDoc.CreateDate = Format(Now() , "YYYY/MM/DD HH:MM:SS")
Call newdoc.save(True, True)
Print "content-type: application/json;charset=utf-8"
Print |{"Check":true, "JSON":"|+doc.sJson(0) +|" }|
Exit sub