Expand my Community achievements bar.

SOLVED

Hide File Attachment panel in Acrobat

Avatar

Former Community Member


Hi,

I have a Livecycle PDF form, with a file attached.

I want to ensure that the File Attachment Toolbar is always closed when the form is opened.

I can call:

app.execMenuItem("ShowHideFileAttachment");

But this does only seems to toggle the state.  Is there a way to default it to be closed?

PS - By default the Toolbar is closed in Acrobat Pro, but open in Reader

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hmmm,

try it in the docReady:event.

It works for me.

View solution in original post

4 Replies

Avatar

Level 10

Put this script into the initialize:event of your form, to hide all panes.

event.target.viewState = {overViewMode:5};

Avatar

Former Community Member

Hmmm - thanks, but it didn't work.  Initially I got this error:

GeneralError: Operation failed.
Doc.viewState:5:XFA:topmostSubform[0]:initialize

I am using a static PDF form, with fixed pages (Reader Extended).

Avatar

Correct answer by
Level 10

Hmmm,

try it in the docReady:event.

It works for me.

Avatar

Former Community Member

Yep docready works (initialised didn't)

Thanks!