• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 470
  • Last Modified:

Can I create a template (add-in) to disable copy a Microsoft Office Word file?

Hello experts,

I saw a solution to disable some functions on Microsoft Word File is create macro function with empty content. I want disable copy, so I create a module with an empty function:
Sub EditCopy()
End
The copy function is disabled as expected. I want to reuse the template so save it as template (.dot). But I can't reuse it. I don't see function EditCopy when load the .dot file to another Microsoft Word file so the function copy is still enable.

Can you help me? I need a flexible solution to disable any file .doc file I want.

Thanks alot
0
partnerex_dev
Asked:
partnerex_dev
  • 2
  • 2
  • 2
  • +1
1 Solution
 
kishoreb123Commented:
what if i disable the macros & open the word file?
how will you prevent file level copying from explorer
0
 
GrahamSkanRetiredCommented:
As kishoreb indicates, it is easy to get round. However try putting the template in the Word Startup folder.
0
 
PandaPantsCommented:
I think you're looking at a disambiguation problem (yes, that's a real word): You're not actually disabling the Copy function, you're just hiding it by creating another macro with the same name, "EditCopy". When Word encounters two macros with the same name, it resolves the ambiguity -- "disambiguates" the problem -- by extending the name of both macros to include their parent objects, continuing to do so until the two names are unique.

For example, if you have a macro in the NewMacros module of your personal Normal.dot template called "MyMacro", when you look up the list of all available macros you'll see "MyMacro" listed there in alphabetical order along with all the other available macros (see Image 1, below). However, if you add a second macro, also called "MyMacro", to another module in the same template, neither macro shows up in the list of available macros under the name "MyMacro". Instead, both show up with the name of the parent module prepended to the macro name (see Image 2, below).

When you copy in a template containing a macro called EditCopy, that's why you can't find the macro anymore: It's disambiguated to another name. Try looking for it under the name of the module in the template, or, failing that, the name of the template itself, followed by the module name, followed by the macro name EditCopy: [Template].[Module].EditCopy.

That's also why kishoreb and GrahamSkan say it's easy to get around this "disabling" approach: All a user has to do is look deeper into the list of available macros.
MyMacro-1.png
MyMacro-2.png
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
partnerex_devAuthor Commented:
Do we have another way to disable copy? Please help me if you have another solution.

Thanks!
0
 
kishoreb123Commented:
only copy protected PDF is the solution
0
 
PandaPantsCommented:
kishoreb123 is right, about the only way to completely disable the Copy function is to turn the document into some sort of image file, and even then there's no way I can think of to keep someone from executing a Save As or something similar to get a copy of the whole document. It sounds like you're looking for a document management solution.

On the other hand, if Word is your only option, you can try protecting the document (through the Tools menu). If you protect the document as a Form but don't include any Form fields, then the user can't edit or select any portion of the document. If you apply a password, that gives you greater assurance that the user won't just go to Tools | Unprotect and turn off the protection.

There's always a way around any of this, of course, but this keeps all but the most determined plagiarists from copying portions of the document. Good luck.
0
 
partnerex_devAuthor Commented:
Thanks PandaPants, kishored123 and GrahamSkan. Solution protecting the document as a form works enough for me. (Can't selection is not good but is acceptable)
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

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now