Hello,
we have this code:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
'a code for a messagebox is inserted here
Call uidoc.Print
End Sub
and we are getting the error “Document Command is not available” after the Call uidoc.Print row. Does anyone have an idea how to solve this?
Thanks
Subject: Document Command Is Not Available
this code works for me. I’ve inserted it as a button and an action in an exisiting form
Please check:
Is the document open where you execute this code?
Is ‘File’-‘Print’ available or greyed out?
Is the form allowed to be printed (disable printing/forwarding/copying…):
Subject: RE: Document Command Is Not Available
The questions that were proposed here…what if the answer is no to all of them?
Subject: Document Command Is Not Available
That error message typically appears when the uidoc is not in edit mode and some code is trying to change a field value.
Maybe there is some other code executing at same time. Do you get this error if your uidoc is in edit mode?