Show File Open Dialog and get File

Am creating a document where I want to prompt the user with the File Open dialog box and when a file is selected, I want to get that file and attach to the document. I know the scripting allows files to be attached but how do I display the dialog and then attach using the script.
Will greatly appreciate the help.
Am using Adobe LiveCycle Designer 7
Thanks
Nilesh!

Hi Nilesh,
You can use the getDataObject method of the Adobe document object. Below is a sample script that you can attach to the click event of a button to see how it works. For more information on importDataObject and getDataObject go to
http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/javascript/AcroJS.pdf
SAMPLE
======
//Get a handle to the Adobe document object
var doc = event.target;
//Display a file dialog box and assign the name Attachment to the
//DataObject that contains the selected file.
doc.importDataObject("Attachment");
//Get the DataObject and store it in MyData
var MyData = doc.getDataObject("Attachment");
//Clear and display the console window
console.show();
console.clear();
//Output the properties of the DataObject
for (var i in MyData) console.println("MyData." + i + "=" + MyData[i]);
Trevor

Similar Messages

  • Tiger: crashes when using File Open dialog to explore file server

    We have a new Intel-based iMac running Tiger.
    It connects to our file servers just fine when using the desktop/finder. But when in Quark 6.5, or Acrobat Distiller, doing anything that results in the "browse" files dialog messes up when trying to access one of our file servers.
    Occasionally, it will "unexpectedly quit" the second I click on of the shares listed in the left-hand box of the dialog. Sometimes you can look around, but when scrolling up and down in the panes, the list gets graphically messed up, or simply doesn't update properly. Actually clucking on a file results in the program Not Responding + Beachball. Trying to cancel the browse box also results in this.
    Frustrating. Any tips?
    iMac 2Ghz Core Duo   Mac OS X (10.4.7)  

    I think I got it licked: turning off IPv6 at the client resulted in the problems going away (not extensively tested this, though).
    Viewing the AFP logs on the file servers being used showed connections logged as IPv6 instead of IP. I thought this a little odd, as we have Tiger throughout, and IPv6 left at the default "automatic" on all, and they all showed up in the logs with their standard v4 IP address.
    I would be interested in an explanation of why this might have affected it. Right now, I'm a little miffed that such an unnecessary (to most) complexity-creating feature is on by default.

  • Word and Excel file and folder icons missing in File Open dialog box

    Running office 365 on Windows 7 Pro: In Word and Excel, when opening and browsing for files in the file Open dialog box, all file and folder icons are missing.  This problem does not occur within Windows Explorer.

    Can you open Word/Excel files normally?
    Go to File>Advanced>Disable hardware graphics acceleration
    Start Office in safe mode to troubleshoot the issue:
    http://office.microsoft.com/en-001/support/why-cant-i-start-my-office-2013-application-HA104011864.aspx
    If the issue persists, do a repair for your Office suites in Control panel>Program and features>Office>Change>Repair
    Tylor Wang
    TechNet Community Support

  • Making pull down menus and file open dialogs speak

    Hi,
    I'm trying to create some applications that include speech
    assistance for the visually impaired. there are two things that are
    causing problems:
    1. I can't make the file open dialog boxes speak. I would
    like to emulate the behavior of third party screen reader
    applications that speak the identites of GUI elements as the user
    tabs through them. I am able to do this for custom dialogs made
    with the MUI Xtra by putting voiceSpeak commands in the callback
    handler so that as each widget gets focus during tabbing, it speaks
    its identity. But this doesn't appear to be possible with file open
    dialogs created with FileXtra.
    2. I have created pull down menus using installMenu. This
    works great, but I would like the user to be able to navigate these
    menus using the arrow keys, and have each menu item speak as it
    navigated to.
    If anyone has any ideas about how to accomplish these things
    in D11, I would be very grateful.
    thanks.

    It's a 1046: Type was not found or was not a compile-time constant: Void.function openSubMenu(whichSubMenu, currentPosition):Void {
    function closeSubMenu():Void { 1046: Type was not found or was not a compile-time constant: Void.
    this["menuButton"+i].onRollOver = function():Void { 1046: Type was not found or was not a compile-time constant: Void.

  • File open dialog to just get the user selected file name

    Hi,
    I am working on asynchronous file storage to KPRO through my ABAP WD application. For this asynchronous upload
    operation, I just need the file name and file path(not the content). The KPRO servers could be made to use SAPFTP, SAPHTTP in the background to upload documents (triggered via tRFC's).
    Is it possible to have a file open dialog (similar to java file open) which just returns the file path and file name instead of the
    content? Current fileUpload UI element also loads the content which is not desired behaviour for me (because could be a performance problem with large documents uploading).
    Is it possible to select multiple filenames? Thomas Jung's Flash island multiple upload works, but not in my
    asynchronous scenario. Because flex fileReferenceList + upload operation works synchronously.

    You must remember the START-OF-SELECTION event here,  after you select the file name and click F8, the START-OF-SELECTION event is triggered, but if it is not there, nothing will happen.
      if sy-subrc <> 0 or l_rc < 0.
        message id sy-msgid type sy-msgty number sy-msgno       "mo271101
        with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.                                                     "mo271101
        read table l_files index 1 into h_files.
        auszfile = h_files-filename.
      endif.
    start-of-selection.            "<--  Add this
      write:/ auszfile.
    Regards,
    RIch Heilman

  • My mac is converting Word and Excel files into Pages and Numbers files when I click to open them (or download and open them) from an email. I do I get this to stop? It's really aggravating.

    My mac is converting Word and Excel files into Pages and Numbers files when I click to open them from an email. Downloading them and opening them doesn't help. How do I make this stop? I don't use iLife and don't want to; my clients are using Office and it's easier for me, except when I have to copy and paste everything they send me from an iLife file back to Word and Excel. Help!!! It's like Apple has become Microsoft, forcing us to use their apps.

    Do you have Word & Excel installed, if yes, navigate in the finder to an example of each, right click and select 'Get Info' scroll down to 'Open With' and select the appropriate program, check the box that says 'Change All'

  • Photoshop CS6 File Open Dialog missing Preview ?

    Why did Adobe remove the file preview area from the File > Open dialog box?  I like having all my file requestors showing Details mode so I need the Preview window when I am navigating, browsing and opening files.
    Illustrator CS6 still has a Preview window, granted it only works on AI files, it should be able to preview PDFs and EPS files correctly, let alone all raster formats.

    See this thread:
    http://forums.adobe.com/thread/1026436
    You're not likely going to get it back, but there are codecs you can add that will ease the pain, and potentially even make other parts of your system work better than they do now for your needs.
    -Noel

  • Opening file also opens "File Open" dialog

    I have recently noticed a changed behaviour in my Mac OS X Mountain Lion. Every time I double click a file to open it (Excel Spreadsheet, PDF File, etc.) the application gets launched and opens the file. But it also shows the File Open dialog (Excel, Preview, etc...). This is quite annoying because Excel for example opens a blank spreadsheet when I click Cancel on the File Open dialog. Preview at least does nothing. But I still have to dismiss the extra dialog.
    Any idea how to fix this?

    Try to uncheck the Documents/Data check box in iCloud settings, in the perferences dialog.

  • File Open Dialog Box

    Under my install of Vista Enterprise on an AD network, I'm am not getting the "computer" option to access local and network drives when I select "File/Open".  All I get is the redirected "home" directory for that user.  True for all Adobe applications (have the latest Creative Suite 4).  Other Windows apps using Windows file/open dialog box can get to the network.  Tech support said I should have an option to select the OS dialog box, but I do not see that on my install.

    In Edit > Preferences > File Handling, uncheck "Enable Version Cue".  This is where you will find it in CS4; earlier versions may have slight variations.  In some versions, you may also get a checkbox in the file open dialog (down at the lower left, as I recall) that lets you select OS dialog or Adobe dialog.   Also, in Bridge (again CS4), go to Edit > Preferences > Startup Scripts, and uncheck Adobe Version Cue CS4.  (I have this unchecked, and even with Enable Version Cue checked in PS I don't get the Adobe dialog or the option to set it, so the setting in bridge seems to be the master.)

  • How to invoke 'File Open' dialog box in Forms (under unix)

    Hi all,
    On the Unix platform (motif), how do I get the File Open Dialog
    Box by using Forms45.
    Thanks and regards,
    Srinivasa.
    null

    going from 6i to 10g is a migration. That's no easy step normally.
    client-server-functionality has gone. web-functionality is new.
    Install the new webutil-toolset from oracle and use the new file-open-dialog from the webutil.pll. That's the way you work in the new 10g-environment.
    Read in the forms-section of the OTN the migration-papers and the webutil-doc's

  • File open dialog - abap webdynpro

    Hi all,
    please, i'm newbie in abap webdynpro. How to create an input field with file open dialog?
    thanks
    Filip

    Hi,
    You can use FILE UPLOAD UI element from the UI Library for file upload functionality. It returns a XSTRING for the uploaded file. Create an attribute of type XSTRING in your view which contains the FILE UPLOAD UI element and bind the attribute to data property of FILE UPLOAD UI.
    You have to manipulate this XSTRING to get the values from the file.
    Thanks,
    Abhishek

  • Calling Windows File Open Dialog from Forms

    Has anyone used the File Open Dialog of MS-Windows from within
    forms? How do you invoke it and how do you pass arguements (in
    and out) to communicate with it?

    GET_FILE_NAME built-in
    Description
    Displays the standard open file dialog box where the user can
    select an existing file or specify a new file.
    Syntax
    FUNCTION GET_FILE_NAME
    (directory_name VARCHAR2,
    file_name VARCHAR2,
    file_filter VARCHAR2,
    message VARCHAR2,
    dialog_type NUMBER,
    select_file BOOLEAN;
    Built-in Type unrestricted function
    Returns VARCHAR2
    Enter Query Mode yes
    Parameters
    directory_name     
    Specifies the name of the directory containing the file you want
    to open. The default value is NULL. If directory_name is NULL,
    subsequent invocations of the dialog may open the last directory
    visited.
    file_name     
    Specifies the name of the file you want to open. The default
    value is NULL.
    file_filter     
    Specifies that only particular files be shown. The default
    value is NULL. File filters take on different forms, and
    currently are ignored on the motif and character mode
    platforms. On Windows, they take the form of Write Files
    (*.WRI)|*.WRI| defaulting to All Files (*.*)|*.*| if NULL.
    On the Macintosh the attribute currently accepts a string such
    as Text.
    message     
    Specifies the type of file that is being selected. The default
    value is NULL.
    dialog_type     
    Specifies the intended dialog to OPEN_FILE or SAVE_FILE. The
    default value is OPEN_FILE.
    select_file     
    Specifies whether the user is selecting files or directories.
    The default value is TRUE. If dialog_type is set to SAVE_FILE,
    select_file is internally set to TRUE.
    ** Built-in: GET_FILE_NAME
    ** Example: Can get an image of type TIFF.
    DECLARE
    filename VARCHAR2(256)
    BEGIN
    filename := GET_FILE_NAME(File_Filter=> 'TIFF Files (*.tif)
    |*.tif|');
    READ_IMAGE_FILE(filename, 'TIFF', 'block5.imagefld);
    END;

  • Set File Open dialog path in Acrobat

    Hi forum,
    Is there a way to set the path for the File Open dialog that shows in Acrobat?
    The situation I have is that the navigation up and down folders to Watermarks and files to be inserted is a painful process.
    I would like to add buttons to the add-on toolbar that set the File Open dialog path to predefined folders, however after reviewing the Javascript guide it looks like this simple task is not possible, or exposed by the API.
    Could someone please confirm if this is possible or not?
    Thanks
    Simon

    No, it's not possible.

  • Problem with File Open Dialog box

    Gurus,
    I am using Forms 10g with Windows environment .. My requirement is, to display File Open Dialog Box, and whatever file I am selecting it has to open .. I am able to get Dialog box, problem is, when I select a file (for example, test.txt), I cant see the file getting opened .. Can anyone suggest me how to get the desired result ...
    Pasting my code below
    declare
         a varchar2(100);
    begin
         a := WEBUTIL_FILE.FILE_SELECTION_DIALOG('c:\temp','','*.*','c:\temp',OPEN_FILE, TRUE);
    end;
    Regards

    You can see the code in the webutil.pll library.
    FUNCTION CLIENT_GET_FILE_NAME (directory_name Varchar2 := NULL,
                                   file_name      Varchar2 := NULL,
                                   file_filter    Varchar2 := NULL,
                                   message        Varchar2 := NULL,
                                   dialog_type    Number   := OPEN_FILE,
                                   select_file    Boolean  := TRUE) return Varchar2 is                             
    * CLIENT_GET_FILE_NAME
    *   Client (Browser) side implementation of the standard GET_FILE_NAME Built-in
    *   Used to display File Open, Save  and directory listing dialogs
    *   Implemented using calls to WEBUTIL_FILE
    * Version 1.0.0
    * Change History
    *   1.0.0 DRMILLS 23/DEC/2002 - Creation
    \*********************************************************************************/ Here is one example:
    the_file := client_get_file_name('c:/', null, 'All Files (*.*)|*.*|',null,open_file,true);Francois

  • Enable to record the File Open Dialog window using SHDB

    Hi All,
    I am using CV02N for BDC recording.
    In this transaction I hae a File Browser button, which opens File Open Dialog window (using CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG method). Using this I can given the file name and Open.
    But, this File Open Dialog windows is not getting recorded using SHDB.
    Please help me how to solve this problem.
    Thanks in Advance,
    Shashidhar

    Hi,
    I doubt you can record the file open functionality in BDC.
    if there is any field which requries file path and directory better make it uniform and hard code it.
    Regds,

Maybe you are looking for