-
May 9th, 2014, 02:22 AM
#1
Thread Starter
Hyperactive Member
How can i disable 'SaveAs' and 'Print' option in word document using vb.net
Hello all
I want to make 'SaveAs' and 'Print' options disable from my document using vb.net, Is it possible ?
is there any other way to do that ?
Or how can I stop user from make a copy of document or print it ?
(If he takes screen shot, no issues)
Thanks in advanvced
MCP, MCTS, Microsoft MVP [Asp.Net/IIS]
For more .NET development tips visit .NET Tips
If the post is useful then please Rate it
-
Jul 5th, 2014, 05:46 AM
#2
Member
Re: How can i disable 'SaveAs' and 'Print' option in word document using vb.net
This can be achieved by controlling xml part of your ribbon.
The code is given below to change the ribbon part
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="Ribbon_Load">
<commands>
<command idMso="FilePrint" enabled="false" />
<command idMso="FilePrintQuick" enabled="false" />
<command idMso="FileSave" enabled="false" />
<command idMso="FileSaveAs" enabled="false" />
</commands>
<ribbon>
<tabs>
<tab idMso="TabAddIns">
<group id="MyGroup"
label="My Group">
</group>
</tab>
</tabs>
</ribbon>
</customUI>
You can either write a code in vb.net to control the ribbon or by changing normal.dotm
-
Jul 7th, 2014, 12:28 PM
#3
Re: How can i disable 'SaveAs' and 'Print' option in word document using vb.net
Whats to keep them from copying the file? Remember that anything that is visible on the screen is printable in one way or another. Heck you could even do a screen capture.
You may be better off adding a watermark to your document
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|