Link to home
Start Free TrialLog in
Avatar of amit_banore
amit_banore

asked on

Lotus Notes Cannot Locate Form...help??

I have a database with the form:PrintExpenseForm which i use as a Print form for an Expense Claim. The default printer on my workstation is working fine. I use the following code to achieve this. The code is in the action button of the Expense claim document. But i get the greetings in sequence:
1) Cannot Locate Form: PrintExpenseClaim
2) Cannot locate Default Form
3) Notes Error - Cannot locate Default Form

Anyone help????

     Dim ws As New NotesUiWorkspace
     Dim cDoc As NotesDocument
     Dim uiDocument As NotesUiDocument
     
     Msgbox "Please switch to Landscape mode before printing.", 48, "Alert"
     
     Set cDoc = ws.CurrentDocument.Document
     Set uiDoc = ws.CurrentDocument
     Call cDoc.replaceItemValue ( "Form", "PrintExpenseClaim" )
     Set uiDoc = ws.EditDocument ( False, cDoc )
     Call uiDoc.Print
     Call uiDoc.Close
     Call cDoc.replaceItemValue ( "Form", "ExpenseClaim" )
     Call cDoc.replaceItemValue ( "SaveOptions", "0" )    
ASKER CERTIFIED SOLUTION
Avatar of twalgrave
twalgrave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CleanupPing
CleanupPing

amit_banore:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.