Solved

Printing a document

Posted on 2001-07-24
10
293 Views
Last Modified: 2013-12-18
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
Comment
Question by:tuancd
  • 4
  • 3
  • 3
10 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
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
 

Author Comment

by:tuancd
Comment Utility
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
 
LVL 13

Expert Comment

by:CRAK
Comment Utility
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
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
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
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 13

Expert Comment

by:CRAK
Comment Utility
Thanks Hemanth, I was looking for that fieldname, but couldn't find/remember it. (I could have checked notes.net....)
;-))
0
 
LVL 13

Expert Comment

by:CRAK
Comment Utility
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
 

Author Comment

by:tuancd
Comment Utility
Thanhs Hermanth, your solution work, but just small question, how can I set one document KeepPrivate by using LotusScript.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 100 total points
Comment Utility
doc.~$KeepPrivate = "2", will prevent from copying.
0
 

Author Comment

by:tuancd
Comment Utility
Thanks Herman
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now