Solved

Adding a comment to a email and a field

Posted on 2003-10-21
47
213 Views
Last Modified: 2013-12-18
I have a table on my form - it has 20 rows.  The top row has no fields but has a action button.  The rest of the rows have a editable text field on each row.  Here is what I want, if it can be done?

when the user hits the action button - a form/dialog box appears - with a sendto field and comment field.  The user selects who he wants to send the email to and then adds their comments - the user hits send and the email is sent with the comment to the selected user.  Then the comment is added to the 20 rows table on the form.  So the comment is saved on the form.  

If this makes no sense I can try to it again.

Jaziar
0
Comment
Question by:Jaziar
  • 19
  • 10
  • 9
  • +2
47 Comments
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
Can be done... realizing the 20 limit
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
Note: Much easier in script than formula
0
 
LVL 14

Expert Comment

by:p_partha
Comment Utility
Jaziar,
"when the user hits the action button - a form/dialog box appears - with a sendto field and comment field." - so the user enters comments, but how do u want it to be split across the 20 editable text fields...

Partha
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
REM Let's assume at this point you have already gotten the input, and sent off the e-Mail.
REM The comment text is in a variable named COMMENT.
REM The message recipient is in a variable named RECIPIENT.
REM The table has four columns.
REM Except for the first row, the first column contains fields CmntDate_1, CmntDate_2, ... , CmntDate_20
REM Second column contains fields CmntFrom_1, ..., CmntFrom_20
REM Third column contains fields CmntTo_1, ... , CmntTo_20
REM Fourth column contains Cmnttext_1 , ..., CmntText_20

Dim s as new NotesSession
Dim ws as New NotesUiWorkspace
Dim uiDoc as notesUiDocument
Set uiDoc = ws.currentDocument
Dim doc as notesDocument
Set doc = uiDoc.Document
Dim i as integer
For i = 1 to 20
  If doc.getItemValue("CmntFrom_" & i)(0) = "" Then
    doc.replaceItemValue "CmntFrom_" & i , s.userName
    doc.replaceItemValue "CmntText_" & i , COMMENT
    doc.replaceItemValue "CmntTo_" & i , RECIPIENT
    doc.replaceItemValue "CmntDate_" & i , Now
  ElseIf i = 20 Then
    MsgBox "Your comment was sent, but it could not be recorded here because the table was full."
  End If
Next
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
The fields on the table should all be computed when composed, with a null string formula ("")
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
You can transfer the values using this script.

THis is a prototype, let me know if you don't get it

Sub Click(Source As Button)
      Dim session As New NotesSession
      Dim doc As NotesDocument, dialog As NotesDocument
      Dim ws As New NotesUIWorkspace
' Call the dialog.
      Set db = session.CUrrentDatabase
      Set dialog = db.CreateDocument
      flag = ws.DialogBox( "DialogForm", 1,1, 0, 1, 1, 0, "title", dialog)
' Transfer the values to the fields.
      Set doc = ws.CurrentDocument.Document
      For i = 1 To 20            
            s = doc.GetItemValue( "SendTo_" & i )
            If s = "" Then
                  Call doc.ReplaceItemValue( "SendTo_" & i , dialog.SendTo)
                  Call doc.ReplaceItemValue( "Comments_" & i , dialog.Comments)
                  Exit Sub
            End If            
      Next i
End Sub

~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
I forgot to include the cancel action , here is the corrected code

Sub Click(Source As Button)
      Dim session As New NotesSession
      Dim doc As NotesDocument, dialog As NotesDocument
      Dim ws As New NotesUIWorkspace
' Call the dialog.
      Set db = session.CUrrentDatabase
      Set dialog = db.CreateDocument
      flag = ws.DialogBox( "DialogForm", 1,1, 0, 1, 1, 0, "title", dialog)
' Transfer the values to the fields.
      If flag Then
            Set doc = ws.CurrentDocument.Document
            For i = 1 To 20            
                  s = doc.GetItemValue( "SendTo_" & i )
                  If s = "" Then
                        Call doc.ReplaceItemValue( "SendTo_" & i , dialog.SendTo)
                        Call doc.ReplaceItemValue( "Comments_" & i , dialog.Comments)
                        Exit Sub
                  End If            
            Next i
      End If
End Sub
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
Hemantha's script looks almost exactly like my script! :)

He adds some code for getting the values (which I did not), but I have a place to record the sender and recipient (which he does not).  Neither of us bothered with the mail sending, which is not difficult:

Dim s as new notesSession
Dim db as notesDatabase
Set db = s.currentdatabase
Dim message as notesDocument
Set message = db.createDocument
message.Form = "Memo"
message.Subject = "Comment from database " & db.Title
message.Body = COMMENT
message.SendTo = RECIPIENT
message.Send false
0
 

Author Comment

by:Jaziar
Comment Utility
Not to mess things up but would it be easier and cleaner to append all the comments in one field verses having the 20 rows?
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
It would be sortof cleaner, but you would have a UI problem, if you wanted to line up names with their comments.  The comments would wrap, taking up multiple lines, and you would have no way to keep the matching names/dates in line with their comments.

Another way to do this would be to have one bug mega field containing names, dates, and comments, which you would then have trouble parsing out later iof you ever wanted to.  Something like this:

Set history = doc.getFirstItem("CommentHistory")
history.AppendToTextItem Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13)
history.AppendToTextItem "------------------------------------------------------" & Chr$(13)
history.AppendToTextItem COMMENT & Chr$(13)
history.AppendToTextItem "======================================================" & Chr$(13)




    doc.replaceItemValue "CmntText_" & i , COMMENT
    doc.replaceItemValue "CmntTo_" & i , RECIPIENT
    doc.replaceItemValue "CmntDate_" & i , Now
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
Oops, drop the last thre lines, left over from previous comment
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
Another oops, not AppendTotextItem, but AppendToTextList
0
 

Author Comment

by:Jaziar
Comment Utility
Qwaletee would that code go in to the action button or would it be the value for the text field.  What interface am I using to get the email address and comment  - does it pop up a form or a prompt?  I am little lost
0
 

Author Comment

by:Jaziar
Comment Utility
I created a form named Desc
sendto = DescSendTo
comment = DiscComment
I put a button on there that does this

Mail := @Trim(DiscSendTo);
subject := "Testing Email";
message := @NewLine + @NewLine + DiscComment + @NewLine + @NewLine + "Testing";
@MailSend(Mail; ""; "";subject; ""; message + @NewLine+@NewLine);
@Command([FileCloseWindow])

So that sends the comment to the address - works fine - Now I need to figure out to add this piece with that you guys have up there.  I would like just to append the comment - username - date to the same field.  I think we are getting there.
0
 
LVL 24

Assisted Solution

by:HemanthaKumar
HemanthaKumar earned 150 total points
Comment Utility
Convert the above to lotus script and place it in queryclose of the dialog box form. Use DialogBoxCanceled property to see if the user pressed OK or Cancel button and appropriately execute the script.

In QueryClose use this script equivalent of the above formula

if not source.DialogBoxCanceled then
Dim s as New NotesSession
dim db as NotesDatabase
dim doc as NotesDocument, note as notesdocument
set db = s.CurrentDatabase
set note = source.Document
set doc = db.CreateDocument

doc.SendTo = note.DescSendTo
doc.Subject = "Testing mail"
set rtitem = doct.CreateRichTextItem( "Body" )
call rtitem.AppendText( CHR$(13) + CHR$(13) + note.DiscComment(0) + CHR$(13) + CHR$(13) + "Testing");
doc.send false
End if

0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
include doc.Form = "Memo" in the above script
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 150 total points
Comment Utility
Use some of Hemanth's ealier code (his first comment) to pop up the dailog box -- you will have to create a subform that has the dialog layout, and use that subform name in the ws.DialogBox.  The values are returned in fields in the "dialog" document (Hemanth actually names the variable "dialog").

All this goes in your "add comment" or "send comment" button.

So, we end up with:
     Dim session As New NotesSession
     Dim doc As NotesDocument, dialog As NotesDocument
     Dim ws As New NotesUIWorkspace
' Call the dialog.
     Set db = session.CUrrentDatabase
     Set dialog = db.CreateDocument
     flag = ws.DialogBox( "DialogForm", 1,1, 0, 1, 1, 0, "title", dialog)
     If not flag Then Exit Sub

Dim comment as string, recipient as string
comment = dialog.comment(0)
recipient = dialog.recipient(0)

Dim message as notesDocument
Set message = db.createDocument
message.Form = "Memo"
message.Subject = "Comment from database " & db.Title
message.Body = COMMENT
message.SendTo = RECIPIENT
message.Send false

set doc = ws.currentDocument.document
Set history = doc.getFirstItem("CommentHistory")
history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13)
history.AppendToTextList "------------------------------------------------------" & Chr$(13)
history.AppendToTextList COMMENT & Chr$(13)
history.AppendToTextList "======================================================" & Chr$(13)
doc.save true,true

0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
Are you using R6 ?  If you use R6 you can create a dynamic table, that will grow however large you want.  You can also use passtru html in r6 to build the table from several multi-value fields (enable show passtru html in Notes).

Another approach to create a similar effect would be to create separate documents for your comments, as responses.  Now create a view, with a categorized first column, @text($Ref).
Put in the next columns the fields you like to show, and sort them how you would like.
Now include that view as embedded view, show single category in your form.

Now you have a dynamically growing comments list.  In R6, you can go 1 step further, and use the new InviewEdit feature, to allow people to fill in the form tru the embedded view.

To create the responses, simple use (if newResponse is a response document)
@command([compose]; "newResponse" )

cheers,

Tom

0
 
LVL 15

Assisted Solution

by:Bozzie4
Bozzie4 earned 50 total points
Comment Utility
And in the QuerySave for newResponse, add the @mailsend function or the LS to send the mail.  
Not: This will not be the best way when you are using the InViewEdit feature.

cheers,

Tom
0
 

Author Comment

by:Jaziar
Comment Utility
Set history = doc.getFirstItem("CommentHistory")
 
Is this getting the field on the main form that I want to display to?  So it is getting the value of CommentHistory(which on my form is comments) and appending the new info?

comment = dialog.comment(0)
recipient = dialog.recipient(0)

Is this is getting the values from the dialog form?  

Dim message as notesDocument
Set message = db.createDocument
message.Form = "Memo"
message.Subject = "Comment from database " & db.Title
message.Body = COMMENT
message.SendTo = RECIPIENT
message.Send false

What exactly is this doing?  Is it setting up a email?  

When I run what you have in the action button - my form comes up and I can add the email address and comment - on that form I have a send email button - I click it and the email is sent and the form is closed.  I am now sitting back at my master form.  But no Info has been added to the comment section.  
0
 

Author Comment

by:Jaziar
Comment Utility
OK I have removed the send email button from the subform.  I see the code above sends a email.  Now all I need to know is how to get the variable from the form and update it with the dialog values?  I am sure it is in front of my face, but I am missing it.
0
 

Author Comment

by:Jaziar
Comment Utility
Set doc = ws.currentDocument.document
      Set history = doc.getFirstItem("Discussion")
      history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13)
      history.AppendToTextList "------------------------------------------------------" & Chr$(13)
      history.AppendToTextList COMMENT & Chr$(13)
      history.AppendToTextList "======================================================" & Chr$(13)
      doc.save True,True
End Sub

Set history = doc.getFirstItem("Discussion") <- Discussion is the name of the text field (Computed) I want to append all the text to.

When I hit ok on the subform I get the following error, but I still get the email

Variant does not contain an object


0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
Yes that won't work if you have a new document.

If you want the script to work, Discussion must be a Computed when composed text field, or Computed with formula : Discussion

..
set history = doc.getfirstitem( "Discussion" )
if history is nothing then
set history = doc.replaceitemvalue( "Discussion" , Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13) )
else
history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13)
end if
 history.AppendToTextList "------------------------------------------------------" & Chr$(13)
     history.AppendToTextList COMMENT & Chr$(13)
     history.AppendToTextList "======================================================" & Chr$(13)
 doc.save True,True
...

Are you using R5 or R6 ?

cheers,

Tom
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:Jaziar
Comment Utility
R5
0
 

Author Comment

by:Jaziar
Comment Utility
I get the same error - does the form need to be refreshed to see the changes?
0
 

Author Comment

by:Jaziar
Comment Utility
My Problem Is Diffently in

      Set doc = ws.currentDocument.document
      Set history = doc.getfirstitem( "Discussion" )
      If history Is Nothing Then
            Set history = doc.replaceitemvalue( "Discussion" , Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13) )
      Else
            history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13)
      End If
      history.AppendToTextList "------------------------------------------------------" & Chr$(13)
      history.AppendToTextList COMMENT & Chr$(13)
      history.AppendToTextList "======================================================" & Chr$(13)
      doc.save True,True


It seems to me and I dont fully understand the error that doc.getfirstitem( "Discussion" ) is not working correctly.  Could it be trying to get Discussion off the subform? instead of the main form?  Just a question
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Where is this discussion item located. Main form or Dialog ? And what is the error ?
0
 

Author Comment

by:Jaziar
Comment Utility
Discussion is in the main form - Discussion is the field I want to append all the text comments to

The error is

Variant does not contain an object
0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
It doesn't really matter where the discussion item is.

I would change the script (again) though,  because now, it does changes in the backend that are not reflected immediately in the front end.

'Set doc = ws.currentDocument.document  <--- remove this line
set uidoc = ws.currentDocument
     Set history = uidoc.document.getfirstitem( "Discussion" )
     If history Is Nothing Then
          Set history = uidoc.document.replaceitemvalue( "Discussion" , Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13) )
     Else
          history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13)
     End If
     history.AppendToTextList "------------------------------------------------------" & Chr$(13)
     history.AppendToTextList COMMENT & Chr$(13)
     history.AppendToTextList "======================================================" & Chr$(13)
     
' save it in the backend, but update changes
call uidoc.document.save(True,True)
Call uidoc.reload()

Tom
0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
in the options section of you button, put

Option Declare

That will help you find potential problems....

cheers,

Tom
0
 

Author Comment

by:Jaziar
Comment Utility
1. Set db = session.CUrrentDatabase => RED

2. flag = ws.DialogBox( "Disc", 1,1, 0, 1, 1, 0, "title", dialog) => RED w/error Variable not declared: flag

3. Set uidoc = ws.currentDocument => RED w/error Variable not declared: uidoc

4. Set history = uidoc.document.getfirstitem( "Discussion" ) => RED w/error Variable not declared: history

5. Set history = uidoc.document.replaceitemvalue( "Discussion" , Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13) ) => did not show up in RED but has a error of Variable not declared : S

I think I am so close!

0
 

Author Comment

by:Jaziar
Comment Utility
Should I  do a DIM history As String -> that will declare the field

After I do that I am down to one error and that is in this line

Dim Discussion As String, history As String
      Set history = uidoc.document.getfirstitem( "Discussion" )
      If history Is Nothing Then
            Set history = uidoc.document.replaceitemvalue( "Discussion" , Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13) )
      Else

=>=>=>**history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13) <= ERROR Not A Instance Name: History
      
                End If
      history.AppendToTextList "------------------------------------------------------" & Chr$(13)
      history.AppendToTextList COMMENT & Chr$(13)
      history.AppendToTextList "======================================================" & Chr$(13)
0
 

Author Comment

by:Jaziar
Comment Utility
Here is my Complete Code I have right now---- See Below

Sub Click(Source As Button)
      Dim session As New NotesSession
      Dim uiDoc As notesUiDocument
      
      Dim doc As NotesDocument, dialog As NotesDocument
      Dim ws As New NotesUIWorkspace
      Dim s As New NotesSession
      Dim db As NotesDatabase
      Set db = session.CUrrentDatabase
      Set dialog = db.CreateDocument
      Set uiDoc = ws.currentDocument      
      Dim flag As String      
      flag = ws.DialogBox( "Disc", 1,1, 0, 1, 1, 0, "title", dialog)
      If Not flag Then Exit Sub
      
      Dim comment As String, recipient As String
      comment = dialog.DiscComment(0)
      recipient = dialog.DiscSendTo(0)
      
      Dim message As notesDocument
      Set message = db.createDocument
      message.Form = "Memo"
      message.Subject = "Discussion Thread from database " & db.Title
      message.Body = COMMENT
      message.SendTo = RECIPIENT
      message.Send False
      
      Set uidoc = ws.currentDocument
      Dim Discussion As String, history As String
      Set history = uidoc.document.getfirstitem( "Discussion" )
      If history Is Nothing Then
            Set history = uidoc.document.replaceitemvalue( "Discussion" , Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13) )
      Else
            history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13)
      End If
      history.AppendToTextList "------------------------------------------------------" & Chr$(13)
      history.AppendToTextList COMMENT & Chr$(13)
      history.AppendToTextList "======================================================" & Chr$(13)
      
' save it in the backend, but update changes
      Call uidoc.document.save(True,True)
      Call uidoc.reload()
      
End Sub
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Declare history as item, like this

Dim history as NotesItem
0
 

Author Comment

by:Jaziar
Comment Utility
I made that change and now I am getting a type mismatch
0
 

Author Comment

by:Jaziar
Comment Utility
OK I have resolved the problems - YaaHoo  

There are 2 issues left

1.  When I put more than one email in the sendto - it only emails the first name?
2.  The username is full cn=bob socks etc - I would like it in @Name([CN]; @username)?

0
 
LVL 14

Assisted Solution

by:p_partha
p_partha earned 150 total points
Comment Utility
Jaziar,
change it to liek this

Dim session As New NotesSession
    Dim uiDoc As notesUiDocument
   
     Dim doc As NotesDocument, dialog As NotesDocument
    Dim ws As New NotesUIWorkspace
    Dim s As New NotesSession
    Dim db As NotesDatabase
    Set db = session.CUrrentDatabase
    Set dialog = db.CreateDocument
    Set uiDoc = ws.currentDocument    
     Dim flag As String    
     flag = ws.DialogBox( "Disc", 1,1, 0, 1, 1, 0, "title", dialog)
    If Not flag Then Exit Sub
   
     Dim comment As String, recipient As String
    comment = dialog.DiscComment(0)
    recipient = dialog.DiscSendTo
     Dim message As notesDocument
    Set message = db.createDocument
    message.Form = "Memo"
    message.Subject = "Discussion Thread from database " & db.Title
    message.Body = COMMENT
    message.SendTo = RECIPIENT
    message.Send False
   
     Set uidoc = ws.currentDocument
    Dim Discussion As String, history As String
    Set history = uidoc.document.getfirstitem( "Discussion" )
    If history Is Nothing Then
         Set history = uidoc.document.replaceitemvalue( "Discussion" , Now & " From " & RECIPIENT & " To " & s.commonuserName & Chr$(13) )
    Else
         history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.userName & Chr$(13)
    End If
    history.AppendToTextList "------------------------------------------------------" & Chr$(13)
    history.AppendToTextList COMMENT & Chr$(13)
    history.AppendToTextList "======================================================" & Chr$(13)
   
' save it in the backend, but update changes
    Call uidoc.document.save(True,True)
    Call uidoc.reload()
   
Partha
0
 
LVL 14

Expert Comment

by:p_partha
Comment Utility
oops one change...

Dim session As New NotesSession
    Dim uiDoc As notesUiDocument
   
     Dim doc As NotesDocument, dialog As NotesDocument
    Dim ws As New NotesUIWorkspace
    Dim s As New NotesSession
    Dim db As NotesDatabase
    Set db = session.CUrrentDatabase
    Set dialog = db.CreateDocument
    Set uiDoc = ws.currentDocument    
     Dim flag As String    
     flag = ws.DialogBox( "Disc", 1,1, 0, 1, 1, 0, "title", dialog)
    If Not flag Then Exit Sub
   
     Dim comment As String, recipient As String
    comment = dialog.DiscComment(0)
    recipient = dialog.DiscSendTo(0)
     Dim message As notesDocument
    Set message = db.createDocument
    message.Form = "Memo"
    message.Subject = "Discussion Thread from database " & db.Title
    message.Body = COMMENT
    message.SendTo = dialog.DiscSendTo
    message.Send False
   
     Set uidoc = ws.currentDocument
    Dim Discussion As String, history As String
    Set history = uidoc.document.getfirstitem( "Discussion" )
    If history Is Nothing Then
         Set history = uidoc.document.replaceitemvalue( "Discussion" , Now & " From " & RECIPIENT & " To " & s.commonuserName & Chr$(13) )
    Else
         history.AppendToTextList Now & " From " & RECIPIENT & " To " & s.commonuserName & Chr$(13)
    End If
    history.AppendToTextList "------------------------------------------------------" & Chr$(13)
    history.AppendToTextList COMMENT & Chr$(13)
    history.AppendToTextList "======================================================" & Chr$(13)
   
' save it in the backend, but update changes
    Call uidoc.document.save(True,True)
    Call uidoc.reload()
   
Partha
0
 

Author Comment

by:Jaziar
Comment Utility
OK I know this is getting old - but I will make it worth the time

When the field is empty it works fine, but when there is already some data in the field I get this error when I click the button

Document Command Is Not avaiable
0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
Where do you get this error exactly ?
Try to enable the debugger - and step tru your code untill you get the error.

cheers,

Tom
0
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
And I'm guessing you still don't have multiple recipients working. To make that work, in your dialog box form or subfrm, set the field to be multiple valued.  Declare RECIPIENT as variant (Dim RECIPIENT As Variant).  This will allow the memo's SendTo to accept whatever single or multiple values are entered in the dialog.

As to the Document Command Is Not avaiable, as Tom says, use debugger.  There is a debuger bug when using form buttons; put the statement STOP at the top of your script to avoid it.
0
 

Author Comment

by:Jaziar
Comment Utility
OK that fixed the multiple email problem - IT now sends emails to all the names.  How do I turn the dugger on?
0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
File/Tools/Debug Lotusscript

cheers,

Tom
0
 

Author Comment

by:Jaziar
Comment Utility
It WOrks - IT WORKS - YEA!!!!!!!!!!  One last question ->  Can I put a link to the document in the email it sends
0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
Yes, but you'll need to change the script a bit
instead of
message.Body = COMMENT

put
dim rtitem as notesrichtextitem
set rtitem = message.createrichtextitem( "Body" )

Call rtitem.AppendDocLink( uidoc.document , "link to document" )
Call rtitem.AddNewLine(2)
Call rtitem.AppendText( COMMENT )
...

cheers,

Tom
0
 

Author Comment

by:Jaziar
Comment Utility
I am going to create a new question so I can reward more points to people.  There is still a error and I will open the other question with it.  So look for the new post.
0
 
LVL 15

Expert Comment

by:Bozzie4
Comment Utility
Well the problem is most likely there because you use the QueryClose event to do some uidoc stuff... Right ?

It should be possible to move the code away from the dialogbox , and put that in the main button.

cheers,

Tom

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now