2017-05-25 3 views
0

Cas arrive: Utilisateur De Notes Mail change à Office 365, son email contient le lien Notes de Lotus (Lien du document) qui ne peut pas être accessible. Appelez rtBody.Appenddoclink (LateInVw, "", "Cliquez pour voir votre présence aujourd'hui"), Je mets le "NotesView" dans le corps de l'e-mail qui n'apparaît pas sur le bureau 365. Puis-je savoir Office 365 en avoir façon d'identifier cela est notes application client et essayez d'ouvrir l'application de notes de cette vue?office 365 mail impossible d'ouvrir des notes Lien

Dim tdy As Variant 
Sub Initialize() 
Print"Agent:Request for LateIn Reason started running at " & DateValue(Now()) & "," + TimeValue(Now()) 
    On Error GoTo errhandler 
    Dim ss As New NotesSession 
    Dim db As NotesDatabase 
    Dim LateInVw As NotesView 
    Dim LateInDocs As NotesViewEntryCollection 
    Dim LateEntry As NotesViewEntry 
    Dim LateDoc As NotesDocument 
    Dim StaffVw As NotesView, StaffDoc As NotesDocument 
    Dim AttVw As NotesView, Attdoc As notesdocument 
    Dim MailDoc As NotesDocument 
    Dim rtBody As NotesRichTextItem 

    Set db=ss.Currentdatabase 
    Set LateInVw=db.getview("($Today Not Alerted Late-In Time Records)") 
    Set StaffVw=db.getview("($Active Staff by ID)") 
    Set AttVw = db.Getview("($Effective Attendance Setting By ID)") 
    tdy=Datevalue(Now) 

    'get all time records for today 
    Set LateInDocs=LateInVw.Allentries 
    Set lateEntry=LateInDocs.getfirstentry 
    Do While Not LateEntry Is Nothing 
     Set LateDoc=LateEntry.Document 
     Set Attdoc=Attvw.Getdocumentbykey(LateDoc.TStaffID(0), True) 
     If Attdoc.LateAtt(0)="Yes" Then 
      If Not ApprovedLateIn(LateDoc, LateDoc.TAmend(0), False) Then 
       'get staff mail 
       Set staffDoc=StaffVw.Getdocumentbykey(LateDoc.TStaffID(0), True) 
       If Not staffdoc Is Nothing Then 
        'send email with link to main menu 
        email$=staffDoc.email(0) 
        Set Maildoc=New NotesDocument(db) 
        maildoc.Sendto=email$ 
        maildoc.Subject="Smartcard Attendance System: Late-In Notification for " +Format$(LateDoc.TDate(0),"dd/mm/yyyy") 
        Set rtBody=New NotesRichTextItem(maildoc, "Body") 
        Call rtBody.appendtext(" Dear"+" "+ staffDoc.StaffName(0)+",") 
        Call rtBody.AddNewline(2) 
        Call rtBody.appendtext("You clocked in to work today at "+lateDoc.TAmend(0)+". Please click on the link below to submit your reason for the late attendance. Thank You!") 
        Call rtBody.Addnewline(1) 
        Call rtBody.Appenddoclink(LateInVw, "", "Click to view your attendance today") 
        Call rtBody.Addnewline(2) 
        Call rtBody.Appendtext("***If the box to key in the late-in reason does not appear, kindly use the 'History Attendance' to key-in instead.") 
        maildoc.send(False) 
       End If 
      End If 
      'End If 'check late-in on/off in attendance settings 
      LateDoc.LateInAlert="Send" 
      Call LateDoc.save(True,False) 
     End If 'check late-in on/off in attendance settings 
     Set LateEntry=LateInDocs.Getnextentry(LateEntry) 
    Loop 
Print"Agent:Request for LateIn Reason ended running at " & DateValue(Now()) & "," + TimeValue(Now()) 
    Exit Sub 
errhandler: 
    Print "Got error " & Error$ & " on line " & CStr(Erl) 
    Resume next 
Print"Agent:Request for LateIn Reason ended running at " & DateValue(Now()) & "," + TimeValue(Now()) 
End Sub 

enter image description here

Ceci est mon exemple de code de réécriture en tant que format Mime ...

Sub Initialize 
    Dim ss As New NotesSession 
    Dim db As NotesDatabase 
    Dim vw As NotesView 
    'Dim Doc As NotesViewEntryCollection 

    Dim LateInVw As NotesView 
    Dim Ec As NotesViewEntryCollection 
    Dim Entry As NotesViewEntry 
    Dim Doc As NotesDocument 

    Dim MailDoc As NotesDocument 
    Dim rtBody As NotesRichTextItem 

    Set db=ss.Currentdatabase 
    Set vw=db.getview("(test send mail)") 
    tdy=DateValue(Now) 


    %Rem 
    Set replydoc = db.Createdocument() 
    Call replydoc.Replaceitemvalue("Form", "Memo") 
    Call replydoc.Replaceitemvalue("Subject", "Pre-check Passed - " + apptitle) 
    Call replydoc.Replaceitemvalue("SendTo", indoc.From(0)) 
    Call replydoc.Replaceitemvalue("BlindCopyTo", mailinadd) 
    Set body = replydoc.Createmimeentity 
    %End Rem  
    Set EC = vw.Allentries 
    Set Entry=Ec.getfirstentry 
    Do While Not Entry Is Nothing 
     Set Doc = Entry.Document 

     email$="[email protected]" 
     Set Maildoc= db.Createdocument() 
     Call Maildoc.Replaceitemvalue("Form", "Memo") 
     Call Maildoc.Replaceitemvalue("Subject", "Test Send Mail, Mime Format") 
     Call Maildoc.Replaceitemvalue("SendTo",email$) 
     Set body = Maildoc.Createmimeentity 

     ss.Convertmime = False 
     Set stream = ss.Createstream() 

     stream.Writetext(|<html><body>|) 
     stream.Writetext(|<p>Dear Sir, | + |,</p>|) 
     stream.Writetext(|<p>This is a testing mail. Thanks You!<br>| + |</p>|) 
     stream.Writetext(|<p>|+|Notes://Mulu/482577AE00260EC5/|+ +Doc.Universalid+|</p>|) 
     Call stream.Writetext(|</body></html>|) 

     Call body.Setcontentfromtext(stream, "text/html;charset=UTF-8", 1725) 
     Call maildoc.Send(False) 
     ss.Convertmime = True 

     Set Entry = EC.Getnextentry(Entry) 
    Loop 

End Sub 

Je ne sais pas comment document de notes vient d'ouvrir directement ... comme à chaque fois que je clique sur le lien ça va au frameset lui-même ... ce qui n'est pas correct!

Répondre

1

Si vous posez la question à propos de cette seule application, alors vous devez vous renseigner sur les URL de notes: // que vous pouvez utiliser: read about here. Vous avez juste besoin de changer votre code pour générer une URL correctement formatée pour la vue, à la place ou en plus du doclink. Lorsque l'utilisateur clique sur l'URL notes: //, le client Notes s'ouvre et amène l'utilisateur à la vue. Cependant, si vous disposez de nombreuses applications qui envoient des liens vers des utilisateurs, vous pouvez rechercher une solution qui s'installe sur votre serveur Domino et la gérer automatiquement pour toutes les applications sans devoir modifier le code. . Une société appelée Genii Software a un produit appelé CoExLinks Fidelity qui le fait.

+0

Vous me montrez de la bonne façon! mais je ne suis pas sûr que peu de choses pouvez-vous me donner quelques conseils à ce sujet! postera une image! –