Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 304
  • Last Modified:

Printing a document

Hi all,

I have a document A is prevented copying so I cannot print it, so I intend to write a lotus script by using "CopyAllItem" to copy DocA to DocB and then print out DocB, I can created new DocB from DocA by using "CopyAllItem" command but I don't know how to print out the DocB.

Thanks & Regards,
Tuan.
0
tuancd
Asked:
tuancd
  • 4
  • 3
  • 3
1 Solution
 
HemanthaKumarCommented:
Select the docB via some view and print it !

Other method would be to do programatically would be to
edit the document and once you open it print it

like this
Dim ws as New NotesUIWorkspace
dim uidoc as NotesUIDocument

Set uidoc = ws.EditDocument( false, docB )
Call uidoc.Print

~Hemanth
0
 
tuancdAuthor Commented:
Hi Hermanth,

Thanks for your quick respond, but DocB still can't be printed because of it is inherited the "Disable printing" to be set in the DocA, how can I enable printing on DocB.

Thanks & Regards,
Tuan.
0
 
CRAKCommented:
After copying you should modify the FORM-field: it still refers to the original form with the disable print checkbox.

Make it refer to a form identical to the original: copy the original form to, and reset the disable printing checkbox.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
HemanthaKumarCommented:
Remove the field named $KeepPrivate from the document using agent, running against the selected documents. That should be simple instead of copying and then opening and printing.

Formula

FIELD $KeepPrivate := @DeleteField;


~Hemanth
0
 
HemanthaKumarCommented:
or if you don't have permission to modify docA , then stick to the copy method and for docB, call removeitem method to remove $keepPrivate.

0
 
CRAKCommented:
Thanks Hemanth, I was looking for that fieldname, but couldn't find/remember it. (I could have checked notes.net....)
;-))
0
 
CRAKCommented:
I would not be my first choise, but perhaps there is another option (while you are playing around with different solutions and pieces of script):

Create a new document (DocB), containing only a RT-field and have an object (in script) refer to that field.

Render your document (to be printed) to that RT-field:

Variant = DocA.RenderToRTItem(NotesRTItem)

Then save, print (and delete) that document.....
0
 
tuancdAuthor Commented:
Thanhs Hermanth, your solution work, but just small question, how can I set one document KeepPrivate by using LotusScript.
0
 
HemanthaKumarCommented:
doc.~$KeepPrivate = "2", will prevent from copying.
0
 
tuancdAuthor Commented:
Thanks Herman
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now