These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Disable e-mail attach button

henley.tim
Registered: Aug 1 2007
Posts: 4

COuld you tell me how to disable the attach pdf to e-mail button?

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Windows
dthanna
ExpertTeam
Registered: Sep 28 2005
Posts: 248
Where is the button located? If you are asking about the one's in MS-Office apps, the answer is No.

As for within Acrobat - You can create a JavaScript program (drop it in the JavaScript folder) that removes various items from the menus and toolbars. Package this with your distribution. Upon launch, if the user is fast enough, they may see it on the menu briefly. However as soon as the JS is interpreted the items will dissappear. It won't stop them - a quick internet surf and some bright mind will just delete/rename the file. But it will, like a luggage lock, stop most people.

I have used this "trick" to remove things from our build as part of our corporate distribution with a great deal of success.

Douglas Hanna is a member of the Production Print Technology team at Aon.
www.aonhewitt.com

usera
Registered: Mar 6 2008
Posts: 20
dthanna wrote:
Where is the button located? If you are asking about the one's in MS-Office apps, the answer is No.As for within Acrobat - You can create a JavaScript program (drop it in the JavaScript folder) that removes various items from the menus and toolbars. Package this with your distribution. Upon launch, if the user is fast enough, they may see it on the menu briefly. However as soon as the JS is interpreted the items will dissappear. It won't stop them - a quick internet surf and some bright mind will just delete/rename the file. But it will, like a luggage lock, stop most people.

I have used this "trick" to remove things from our build as part of our corporate distribution with a great deal of success.
Thanks, could you please provide some sample code here for us to learning?
maryfleck
Registered: May 5 2006
Posts: 3
DTHANNA, would love to know "how to" from your explanation. Please advise.
dthanna
ExpertTeam
Registered: Sep 28 2005
Posts: 248
Sure,

In general, three steps:

1) Find out what the menu names are for the product you are using.

A comprehensive list is not found in in a book or manual. So, roll your own tool.

Create a brand new (clean) PDF. File | Create PDF --> From Blank Page (hold Shift key down in A7 and it will appear)Create a LARGE text box (form object) - almost the entire page.
Give it the name of 'f' - yup, just the single character. It works with the code below.

Create a button (use form tools).
Have that button execute a JavaScript.
Use this code:
------------------------
//* Generate a list of all menu names.*//

var menulist = ""; // String to build formatted list of names

function FancyMenuList(m, nLevel) // Recursive function to format list.
{
var s = "";
for(var i = 0 ; i < nLevel; i++) s += " "; // Steps to right on each level (+1)
menulist = menulist + s + "+--" + m.cName + "\n"; // Formats printout
if (m.oChildren != null) // Breaks up one level of recoursion
for (var i=0; i < m.oChildren.length; i++) // Loops through each child element
FancyMenuList(m.oChildren[i], nLevel + 1); // Drops down one level when child +1's
}/* Put script title here */

//var f = this.getField("ouput");
this.getField("f").value = " "; // Initialize output
var m = app.listMenuItems(); // Grap the initial list of menu items
for ( var j=0; j < m.length; j++) FancyMenuList(m[j],0); // Go through each menu item in the list
this.getField("f").value = menulist; // Populate the output textbox.
--------------------------------------------------
Save your PDF.

BTW - I received the above code from somewhere (but cannot remember where) and modified as needed. Here is your kudos if the above was your code.

Click on the button - after a second you will get a list that looks like this..

+--File
+--Open
+--Organizer
+--OpenOrganizer
+--AddToOrganizer
+--OrganizerNewCollection
+--endOpenGroup
+--NewDocument
+--NewDocFromFile
+--NewDocCombineFiles
+--Scan
+--Web2PDF:OpnURL

The leaf nodes are the actual menu names with the root nodes being the major menu categories. Makes it easy to find things.

Copy the entire list (it's too big for the text box) into Notepad or similar editor.

Place cursor in front of the + in at '+--File' then press CTRL+SHIFT+END - this will hightlight all the text. Then CTRL+C to copy.

Paste it into your favorite editor.

Now you have your list to dig through....

Note: The above will also work in Reader - you just cannot save the PDF.

2) Create the folder level JS.

Create a .JS file (Notepad works just fine) and drop it into
C:\Program Files\Adobe\Acrobat >your version<\Acrobat\JavascriptsIt will have nothing more than a series of app.hideMenuItem(""); entries and will look something like this:
/* Begin Code */
//app.hideMenuItem("SystemInformation");
app.hideMenuItem("AdobeExpertSupport");
//app.hideMenuItem("OnlineSupport");
app.hideMenuItem("Updates");
app.hideMenuItem("RegisterProduct");
//app.hideMenuItem("AdobeOnline");
//app.hideMenuItem("AccessOnline");
//app.hideMenuItem("DetectAndRepair");
//app.hideMenuItem("AboutAdobeExtensions");
//app.hideMenuItem("AboutExtensions");
//app.hideMenuItem("UsingExtensions");
app.hideMenuItem("BuyAcro");
/*End Code*/

The '//' entries are just commented out as we use the same file for multiple products - just commenting/un-commenting as needed.

Use the above list to determine exactly what text place the parameter for app.hideMenuItem("");

3) Enable menu code execution.

From Acrobat Preferences: JavaScript make sure the following are enabled (checked)
Enable Acrobat JavaScript
Enable menu items JavaScript execution privileges

For a rollout here are the registry entries:
HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\>your version<\JSPrefs
Name: bEnableJS
Type: DWORD
Value: 1

Name: bEnableMenuItems
Type: DWORD
Value: 1

Hope this helps.

Holler if you have any additional questions.

Thanks

Douglas Hanna is a member of the Production Print Technology team at Aon.
www.aonhewitt.com