Get selected item in inbox

hi guys,
first of all im new to notes programming, so please be patient...
here is my problem:
i need a function, that returns me the mailitem a user selects(not opens) in his/her inbox...
i want to add a button(i think its called agent in notes) in the inbox view and when somebody first selects a mail, then clicks on the button i want to work with the selected message (e.g. resend it to another address)...
is this possible? (i hope anyone understands what i am talking about)
i would be glad if someone answers...
bekuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ArunkumarCommented:
Just use the Forward button and this email will be copied to a new memo and you can edit it before sending it to someone !!!

-Arun.
0
ArunkumarCommented:
You are lucky as you can select multiple mails and use Forward all the memos will be copied into a new mail.
0
ArunkumarCommented:
And...if you dont see the forward button already on the view you can find it in the Actions menu.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

bekuAuthor Commented:
First of all thx for your Xtremly fast reply Arun...
but think you didnt understand my question(this is not a question about handling the notes client, its about customizing the mail6 template with domino designer). i will try to explain the WHOLE problematic:
first of all i want to add a button to the mail6 template.
this button should be seen by any user, that looks into his/her inbox. i will place the button next to the "forward" and "reply" buttons. i will name it "voice".
now, if some user selects a voicemail in his/her inbox and then clicks on my custom voice button, i would like to read his/her phone number from the address book and then forward the mail to his/her telephone (i have written a mailserver application that can do this).

i know how to do all of this, except how to get the selected mail object(the mailmessage the user selects, before he/she clicks on my custom voice button), so i can change the "To" address and forward it via my mailserver application to the telephone... (maybe this inbox view has some property that can return me the selected message)

ps.: sorry for my bad expression (i dont speak native english)
0
ArunkumarCommented:
oh okay...

Hopeyou have designer client with you.  On the server locate the StdR60Mail Template.

Open the database (A Template has .ntf extension) and on the left pane find the design elements.  Locate Folder and inside folders you will see ($InBox).  Double click to open this in designer client.  You will see the programmers pane at the bottom and the view design at the top.  Select from view menu - View - Action Bar.

This will open a new pane where you can see the buttons. Now this is the place you can add a new action button to your template.  Create - Action from the menu will allow you to do it.

Once you do it in the template it will be propagated to all the mailboxes overnight. You could also custom force design immediately by issuing console command.

Overall...touching the design of the template is risky. Make a backup before you start playing.

-Arun.
0
bekuAuthor Commented:
...adding the button to the template is not the problem, i also know how to "distribute" the template to all the clients with the "load design" console command.

the problem is how to automatically insert the "office phone number" of the address book entry into the "To" field of the message(the one the user selects before he/she presses the "voice" button i added) and then automatically forward it...

i know how to get the "office phone number" of the current user from the address book via lotus script(i wrote a small function that retrieves the "office phone number" of the current user).

but i dont know how to !automatically! alter the "To" field of the selected message and then send it (with attachments).
0
ArunkumarCommented:
Here is a raw code untested....

------------
Dim ss As New notessession
     Dim ws As New NotesUIWorkSpace
     Dim uidoc As NotesUIDocument
     Dim db As  NotesDatabase
     Set db = ss.Currentdatabase
     Dim dc As NotesDocumentCollection
     Dim doc As NotesDocument
     Dim rt As notesrichtextitem    
     Set dc = db.UnProcessedDocuments
     
     If dc.Count <> 1 Then
          Msgbox "Please select only one document to forward"
     Else
          Set doc = dc.GetFirstDocument          
          Set rt = doc.GetFirstItem("Body")
         
          Dim newdoc As NotesDocument
          Dim rt1 As NotesRichTextItem          
          Set newdoc = db.CreateDocument
          newdoc.Form = "Memo"
          Set rt1 = New NotesRichTextItem(newdoc, "Body")
          Call rt.AppendRTItem(rt1)
          newdoc.SendTo = "TESTING"          ' Change this TESTING to have your phone number.
          Set uidoc = ws.EditDocument(newdoc)              
     End If              
----------------------
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bekuAuthor Commented:
ahhh i see!
seems like you are the real god of domino designer!
thx very much for your patience!
its a pity i only have 75 points... if i had more i would give them to u! you really deserve them!
adios!
0
ArunkumarCommented:
Did it work for you ?
0
bekuAuthor Commented:
i will test it tomorrow since i have too much to do today..
if it doesent work, i will write another comment...
0
bekuAuthor Commented:
hi arun,
im afraid, it didnt work...
the new form opens, but the sendto field is not replaced.
i tried to debug the script, and in the sendto property of the new document , the sendto field is filled with my phone number. strange isnt it?
another problem is, that the new form that opens, has no send button. even though i specified the form type as memo, it has the same buttons as the inbox...
i would also like the new memo to send itself automatically after the sendto field is filled in...
0
bekuAuthor Commented:
finally solved the problem:
Dim ss As New notessession
    Dim ws As New NotesUIWorkSpace
    Dim uidoc As NotesUIDocument
    Dim db As  NotesDatabase
    Set db = ss.Currentdatabase
    Dim dc As NotesDocumentCollection
    Dim doc As NotesDocument
    Dim rt As notesrichtextitem    
    Set dc = db.UnProcessedDocuments
   
    If dc.Count <> 1 Then
    Msgbox "Please select only one document to forward"
    Else
         Set doc = dc.GetFirstDocument          
         Set rt = doc.GetFirstItem("Body")
         
         Dim newdoc As NotesDocument
         Dim rt1 As NotesRichTextItem          
         Set newdoc = db.CreateDocument
         newdoc.Form = "Memo"
         Set rt1 = New NotesRichTextItem(newdoc, "Body")
         Call rt.AppendRTItem(rt1)
         newdoc.SendTo = "TESTING"'Change this TESTING    
         to have your phone number.
         Set uidoc = ws.EditDocument(newdoc)              
         uidoc.EditMode = True
         Call uidoc.FieldSetText("EnterSendTo", "TESTING")
     Calluidoc.Send                                             Call uidoc.Close
    End If              

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.