Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing a Lotus Notes Doc from VBA

Status
Not open for further replies.

timmy773

Technical User
Nov 24, 2002
17
0
0
US
I'm using visual basic to update some information in a lotus notes database...specifically the contact database...names.nsf. My code opens the document in edit mode, changes the appropriate field value, then saves it. But when I try to close the document I get an error "Object doesn't support this property or method". It's erroring out on the "call doc.close line below...if I take that out everything works fine, but I get every contact in my address book opened in edit view at the same time and I have to manually close. Help please!!!

Set doc = db2.GETDOCUMENTBYUNID("0F296CF6BE986EDD862568790056DC82")
Call workspace.EditDocument(True, doc)

Call doc.REPLACEITEMVALUE("CompanyName", " ")
Call doc.Save(True, False)
Call doc.Close
End If
 
Sorry, I don't know the answer directly. Have you tried kicking your code into single step mode and seeing what other methods are available to you? Or if you just set your reference to nothing will it close it for you?

I realize these are not the best answers but maybe they'll help indirectly.

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top