Thanks Timothy… However, I am getting the same error msg
I am just wondering if I need to “import” something more?.. Also, the code is able to retrieve DB.Title. How is it able to do that when, no where in the code, I am supplying the ID password.
As far as imports, you should only need to import the pythonwin for the com libraries (as you seem to be doing) via:
import win32com.client
Although I would declare this at the top of the code (for global access), not inside just one of the functions… although to be honest, I am forgetting the rules of scope here.
As far as authentication, using COM libraries requires access to the product’s native libraries (a.k.a. nnotes.dll has to be accessible).
If have Notes client up and running at the time you run your python script, and if your user id security setting has “Don’t prompt for a password from other Notes-based programs (reduces security)” - then this would explain the lack of the authentication prompt. You are effectively sharing your logged in state with your com program. This works the same when you are doing Notes C API and C++ API programming as well, or any other COM programming with Notes.
If you uncheck this or else close the Notes client, you should certainly get the password prompt each time you init a Notes session via COM…
I know you say the view has docs in it - but i’d make sure your program can see really the doc. Can you check the NDoc against null to make sure you have a valid handle?
if NDoc is None:
print “invalid doc handle”
And remember to use the appropriate whitespace/pretty print format - Python is sensitive to this.