Hi,Our client requirement is hide the print option available in file and provide printing button to some specific person.
I solved this problem but whenever i print the document it print in first time but second time it gives error"document command is not available".If i closed the database it again work properly.
while i used edit mode also.I am also provide sciripting i have been used.
Plz help me.
Sub Click(Source As Button)
Dim ws As New NotesUiWorkspace
Dim uidoc As notesuidocument
Dim udoc As NotesDocument
Dim uiview As NotesUIView 'change
Set uiview = ws.Currentview
Set uidoc = ws.CurrentDocument
uidoc.EditMode=True
uidoc.AutoReload = True
Set udoc = uidoc.Document
Call udoc.ReplaceItemValue("$KeepPrivate","0")
Call uidoc.fieldsettext("ButtonClicked","1")
uidoc.EditMode=True
'Call uiview.Print
'Call uidoc.Print
Call udoc.Save(True,False)
Call uidoc.Print(1,0,0,False)
'Call uidoc.Print
uidoc.AutoReload = True
Call udoc.ReplaceItemValue("$KeepPrivate","1")
Call uidoc.fieldsettext("ButtonClicked","1")
Call uidoc.save
Call udoc.Save(True,False)
Call uidoc.close
End Sub
Thanx & Regards
Sonal Singh