Solved

Lotus notes Assigned To property from vba

Posted on 2013-06-13
6
625 Views
Last Modified: 2013-12-18
Hi Experts,

Is it possible to get the property called "Assigned to"?

We use this property in our department mailbox that we share and therefore assign mails to the one responsible for responding the mail.

An i would like to read this property when looping the inbox.

Is that possible?
0
Comment
Question by:DCRAPACCESS
  • 3
  • 3
6 Comments
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 500 total points
ID: 39243945
Try this

dim s as string
s= doc.getitemvalue("AssignedTo")(0)

AssignedTo is not a property but a field (more correctly: an item), the methode getitemvalue always returns an array, and index 0 is the first value.

Some more of your code would be nice... Next time?
0
 

Author Comment

by:DCRAPACCESS
ID: 39244192
did not work, this is my code:

Dim stPath, EMBED_ATTACHMENT, RICHTEXT, sletmail, frafolder, tilfolder, filnavnet
 
 stPath = ""
 filnavnet = ""
 frafolder = "($inbox)"
 tilfolder = ""
 EMBED_ATTACHMENT = 1454
 RICHTEXT = 1
 sletmail = ""


  Dim noSession
  Dim noDatabase
  Dim noView
  Dim noDocument
  Dim noNextDocument
  Dim Today
  Dim text
  Dim suffix
  
 
  Dim vaItem
  Dim vaAttachment
 
  Set noSession = CreateObject("Notes.NotesSession")
  Set noDatabase = noSession.GETDATABASE("w19732/EJBY/DDB", "DEPTMAIL\3780R3780DP.nsf")
  Set noView = noDatabase.GetView(frafolder)
  Set noDocument = noView.GetFirstDocument
  Do Until noDocument Is Nothing
    Set noNextDocument = noView.GetNextDocument(noDocument)
    Debug.Print noDocument.getitemvalue("AssignedTo")(0)
    Set noDocument = noNextDocument
  Loop
  Set noNextDocument = Nothing
  Set noDocument = Nothing
  Set noView = Nothing
  Set noDatabase = Nothing
  Set noSession = Nothing

Open in new window

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 39244263
Did you get some error message? Does it indicate a line where the execution stops? What if you run it in the debugger? Are you sure the code inside the loop of lines 29-33 is executed?

If you don't intend to use the UI classes, it should be better to use Lotus.NotesSession.
See also: http://www.ibm.com/developerworks/lotus/library/ls-COM_Access/
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:DCRAPACCESS
ID: 39244289
Found it :-)

getitemvalue("RESPONSIBLE")(0)

But you code really helped me!!!!
0
 

Author Closing Comment

by:DCRAPACCESS
ID: 39244294
You help me find the right way to get result i wanted!
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 39244308
Splendid!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Combobox row source 2 20
Trying to open FORM in specific record !! 6 44
trying to catch ODBC error when database opens 2 26
DCount Type Mismatch 2 21
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 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