• Drag and Drop to QuickStuff improvemtment

    By Dwight Wilbanks 2 decades ago

    in the QuickForward sub in OpenNTFLibraryUI its functionality is more like a resend to new recipient, I would like it to be a real forward.



    In addition, I would like to remember previous comments for each user.



    I put together some code, but, Im not sure I like it completely.



    What do yall think? Be kind, Its a quick stab at it.



    %REM

    Set newdoc = doc.CopyToDatabase(db)<br/>
    Call newdoc.RemoveItem(&quot;Encrypt&quot;) <br/>
    Call newdoc.RemoveItem(&quot;ReturnReceipt&quot;) <br/>
    Call newdoc.RemoveItem(&quot;Action&quot;) <br/>
    Call newdoc.RemoveItem(&quot;DeliveredDate&quot;) <br/>
    Call newdoc.RemoveItem(&quot;DefaultMailSaveOptions&quot;) <br/>
    Call newdoc.RemoveItem(&quot;Categories&quot;) <br/>
    Call newdoc.RemoveItem(&quot;CopyTo&quot;) <br/>
    Call newdoc.RemoveItem(&quot;from&quot;) <br/>
    Call newdoc.RemoveItem(&quot;inetfrom&quot;) <br/>
    Call newdoc.RemoveItem(&quot;inetcopyto&quot;) <br/>
    Call newdoc.RemoveItem(&quot;PostedDate&quot;) <br/>
    Call newdoc.RemoveItem(&quot;Sign&quot;) <br/>
    

    %END REM

    <br/>
    

    '*** NEW STUFF BEGIN

    Dim QuickComments As Variant<br/>
    Dim QuickNames As Variant<br/>
    Dim QuickItemNum As Long<br/>
    Dim DefaultComments As Variant<br/>
    If prefDoc Is Nothing Then<br/>
        Set prefDoc = db.GetProfileDocument(&quot;CalendarProfile&quot;)            <br/>
    End If<br/>
    QuickComments   = prefDoc.QuickComments<br/>
    QuickNames  = prefDoc.QuickNames<br/>
    <br/>
    If Isnull(Arraygetindex(QuickNames,TargetAddr)) Then<br/>
        If Len(QuickNames(0)) = 0 Then<br/>
            QuickItemNum = 0<br/>
            QuickNames(QuickItemNum) = TargetAddr<br/>
            QuickComments(QuickItemNum) = &quot;&quot;<br/>
        Else<br/>
            QuickItemNum = Ubound(QuickNames) +1<br/>
            Redim Preserve QuickNames(QuickItemNum) As String<br/>
            Redim Preserve QuickComments(QuickItemNum) As String<br/>
            QuickNames(QuickItemNum) = TargetAddr<br/>
            QuickComments(QuickItemNum) = &quot;&quot;<br/>
        End If<br/>
    Else<br/>
        QuickItemNum = Arraygetindex(QuickNames,TargetAddr)<br/>
    End If<br/>
    <br/>
    <br/>
    <br/>
    Set newdoc = New NotesDocument(db)<br/>
    Dim BodyRTF As New NotesRichTextItem(NewDoc,&quot;Body&quot;)<br/>
    Dim Comments As String<br/>
    If QuickComments(QuickItemNum) = &quot;&quot; Then<br/>
        Comments = Inputbox ( &quot;Add additional Comments&quot; &amp; Chr(10) &amp; &quot;or &lt;space&gt; to add nothing&quot; , &quot;Comments&quot; , &quot; &quot; )<br/>
    Else<br/>
        Comments = Inputbox ( &quot;Add additional Comments or -None- to add nothing&quot; , &quot;Comments&quot; , QuickComments(QuickItemNum) )<br/>
    End If<br/>
    If Len(comments) = 0 Then<br/>
        Messagebox &quot;Operation cancelled&quot;<br/>
        End<br/>
    Elseif Len(Trim(comments)) &gt; 0 Then<br/>
        Call BodyRTF.AppendText(Comments)   <br/>
        Call bodyRTF.AddNewline(1)<br/>
    End If<br/>
    QuickComments(QuickItemNum) =Comments<br/>
    prefDoc.QuickComments = QuickComments<br/>
    prefDoc.QuickNames = QuickNames<br/>
    Call prefDoc.Save(1,1)<br/>
    Call doc.RenderToRTItem(BodyRTF)    <br/>
    newdoc.Subject =  &quot;Fw: &quot; &amp; doc.Subject(0)<br/>
    <br/>
    newdoc.Form = &quot;Memo&quot;<br/>
    

    '*** NEW STUFF End

    • Great idea

      By Steven R Cannon 2 decades ago

      I frequently like to drag a memo and FYI it to someone. It'd be nice to have the message look like it's forwarded and to have the FYI comment already displayed.

      • I'll look into this

        By Ben Rose 2 decades ago

        I'll have a play with this and see if I can incorporate into the International template.



        Cheers,



        Ben