Creating a Save As dialog box with Applescript for Excel 2008

This is going to be part of a larger script. I'm trying to figure out how to make the default save location to where the file opened from and the default file name to the current filename in the dialog box.
Here is what I go so far...
tell application "Microsoft Excel"
tell active workbook
set myFile to choose file name with prompt "Save file as:"
end tell
end tell
I'm very new with working with Applescript, so at this point I have been piecing together code snippets.
Any help would be great and thank you

The choose file name command supports a default location parameter that tells it where to open the dialog:
set myFile to choose file name with prompt "Save file as:" default location (alias "Macintosh HD:Users:username:foldername:")
So you need to look at the Excel dictionary to determine the path to the current file and insert it into the script. Every version of Excel has slightly different dictionaries so the version you're running is critical to getting the right syntax.

Similar Messages

  • How can I Create custom pop up dialog box with question/answer

    I need to create a pop up dialog box that asks a question and accepts an answer input.  The form needs to be able to be emailed out (not server based)  Can someone help me do this?  I am a designer,  with very (Very!) limited coding skills.   Looks like the windjack program that I keep running into does not work with Acrobat X.
    Thanks for any help you may have

    I am not able to help you with the current method you are using - which seems an odd one in that you are using a menu script to do this????
    I would have done the page completely differently - instead of slicing it up into a vastly complex table, I'd have added the image to the page and then used an imagemap.  Then I'd have used this script to add the popups (as toolitps) that you can be as simple or as complex as you wish: http://boxover.swazz.org/.
    E. Michael Brandt
    www.divahtml.com
    www.divahtml.com/products/scripts_dreamweaver_extensions.php
    Standards-compliant scripts and Dreamweaver Extensions
    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, et alia

  • Populate save as dialog box with predefined filename

    I have a button in a form that when click, pop up a 'save as' dislog box. The java script command is as
    app.execMenuItem("SaveAs");
    How can I populate a pre-defined filename to the dialog box?
    Thank you.

    Nope ...no programatic access to clipboard from Acrobat/Reader. The only way you can do this is to certify the form - which has its own set of issues (mostly management of certs).

  • Why does it take so long for the Open, Save, or Save As Dialog Boxes to Open?

    I'm having a problem throught CS6 with the Open, Save, or Save As dialog boxes not opening for a period of time after clicking on the desired functions.  It can take over a minute just to get the Open dialog box up to browse for a file.  Eventually, the dialog boxes open, but during the time that it's trying to open, the program is unresponsive.  It is happening with all of my CS6 programs.  I have unistalled and reinstalled with no fix.  The programs are updated.  Anyone else having this trouble?  Any solutions?

    Thanks for your response.  The system is a Windows 7 64-bit system with 4GB RAM installed.  I am not trying to save anywhere in particular.  By default, it would open to the user's documents, and does eventually, but it currently just sits for about a full minute before doing anything.  This machine was saving properly when CS6 was first installed about 5 months ago. 
    I've checked for unconnected network drives. I've also renamed the Illustrator preferences file based on a reccomendation that I found elsewhere.  However, neither of these helped.
    I can provide screenshots or anything else that's needed.

  • When I try to add an RSS or Atom feed, I get a dialog box with Open or Save instead of adding the feed to NewsFox like it used to do.

    With Firefox 4.x, when I added a feed, it would open NewsFox in a new tab, and bring up a dialog box with info about that feed. I would click on "test this feed" and it would put all available items into NewsFox. Now, I get this dialog box with Open or Save. If I click on Open (declaring Firefox as the preferred app), then it opens the feed itself, it doesn't add it to NewsFox. I've tried going into Options and about:config but don't see anything to change that would fix this problem. I tried Search in Firefox Help but no relevant threads came up.

    Thanks Cor-El. I already have it set to "Use NewsFox." I'm stumped.

  • Trying to create a "Combine PDF" that also has a "save as" dialog box

    I am able to get the Combine PDF to work but it just saves them as randomly named files on the desktop that I then need to rename manually. Is there some way to make a "save as" dialog box pop up after combining the files? So if I had a bunch of PDFs it would go:
    Right Click on selected files > Automator > Combine PDF > Save As
    Is this possible?

    Set up you worflow as:
    Get Selected Finder Items
    Combine PDF Pages
    Open Images in Preview
    Run Applescript
    +copy this into the Applescript box+
    tell app "System Events"
    keystroke "s" using {command down, shift down}
    keystroke "d" using {command down}
    end tell
    I also like to add a Sort Finder Items after the Get Selected Finder Items.

  • On a MBP with Mavericks how do I get the Save As dialog box to open at the same size and place at which it was last closed and used to happen before Mavericks?

    Before I upgraded my MBP to Mavericks, the Save As dialog box would reopen at the same size and position as it was when last closed.  Now with Mavericks it always opens in the same position at a very small size.  Is there a way to make it reopen at the last place and size at which it was closed?

    I have resolved the issues presented without having to find and uninstall the Macromedia Flash Player 8.0 in order to get "Adobe Flash Player 10" playback of .swf files on my computer. When I begin this task, I expected to download an "Adobe Flash Player 10" as a player program download instead of the Internet Explorer and Firefox plugin that it appears to be.
    This is what I did and what I believe I have:
    1. I setup Internet Explorer 6 as my default browser and then used the following site to download Adobe Flash Player 10
    http://www.adobe.com/products/flashplayer/
    2. As I had done before (and also suggested in another thread here), I went to Tools/Manage Add Ons and found Shockwave Flash Object, highlighted it, and clicked on Update Active X. Next, what I did not do before, I restarted the computer immediately after that.
    3. Next, I set Mozilla Firefox as my default browser and then used the above site to download Adobe Flash Player 10 again.
    4. With Firefox, the critical step included Firefox Tools/Options/Content with File Types (Configure how Firefox handles certain types of files) and the Manage Tab there. SWF Shockware Flash Object/Change Action/and dotting "use this plugin" - Shockwave Flash, followed by a computer restart got the job done.
    Now, if I want playback of a .swf file, I can
    a. Open With Internet Explorer (assumed with the Adobe Flash 10 "plugin")
    b. Open With Mozilla Firefox (assumed with the Adobe Flash 10 "plugin")
    c. Open With Macromedia Flash Player 8.0
    I am satisfied with those results for my use. Any additional comments on the player vs plugin aspect of the matter would be interesting and helpful.
    ATR

  • Creating a dialog box with OK and Cancel buttons without OADialogPage

    Hi Experts,
    i want to create a dialog box for Delete Confirmation means after clicking on delete it should pop up a small dialog box with OK/Cancel buttons
    and need code for the same to handle the buttons.
    i have created with OADialogPage but its showing in a complete page but i want to show those buttons in a small box.
    Plz help.
    THANKS IN ADVANCE.
    Thanks
    Raja.

    Hi,
    I have not tried using javascript in destination URI as suggested by Mukul.
    I have tried the below code for opening a page as dialog box.
    You can try it for your requirement by creating a dialog page of your own, say XXDialogPage (with OK and Cancel button)
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?page=/xx/oracle/apps/fnd/dialog/webui/OADialogPG";
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:500, height:500},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    In dialog page's controller, you can forward it to the page onc ethe user selects OK or Cancel.
    Pass the selected value back to the main page and further you can use it for deleting.
    Regards.

  • How can I add form field value to the file name in save as dialog box

    I do not want the form to be saved automatically, just want the form to auto populate the "file name" only.
    A little background on the forms I want to use:  My company has 70 retail outlets, I'll use one of our pdf forms called an "Incident Report" as an example.  I would like for a store manager to be able to complete the form, then email the form to the main office (I already have javascript to add field values and form name to the email subject line), once the main office receives it, I want for them to be able to file the pdf electronically on our server.  We have mutliple forms that we use so I do not want any of the forms to automatically save anywhere, (at this time anyway) I just want the office personnel to be able to click "save as" (or whatever they will need to click) and the form automatically add certain field values from the pdf they have received, of which will be different each time the form is sent to the office (Date, store #, employee name etc.) in addition to the name of the form in the "File name" of the "Save As" dialog box.  The main office employees will decide into which server file the pdf should be saved.
    I'm using Acrobat 8 professional, the stores and office personnel use Adobe reader.
    One little note:  We currently print and file a lot of paper on a daily bases, as soon as I can get this to work, we are going green.
    Me and a lot of trees in this will really apprecitate any help you can give with this!  :-)

    You might want to take a look at the document "Developing Acrobat Applications Using JavaScript" (js_developer_guide.pdf) which is part of the Adobe Acrobat SDK, which can be downloaded here. Read the "Privileged versus non-privileged context" (p. 45ff.). You will find an example for "Executing privileged methods in a non-privileged context". Should be almost exactly what you are looking for.
    Small Outline: For security reasons ("the user always has to know what's going on") you are not allowed to use the "Doc.saveAs"-method without the user permission (--> in a non-privileged context). In order to reach the goal of a privileged context you can use a trusted function. You do this by creating a JavaScript file (*.js) in either the Application-JavaScript-Folder (default location on Windows systems: "%ProgramFiles%\Adobe\Acrobat 10.0\Acrobat\Javascripts") or the User-JavaScript-Folder (default location on Windows systems: "%AppData%\Adobe\Acrobat\10.0\JavaScripts"). Add the following content to the new file:
    myTrustedBrowseForDoc = app.trustedFunction( function ( oArgs ) {
         app.beginPriv();
              var myTrustedRetn = app.browseForDoc( oArgs );
         app.endPriv();
         return myTrustedRetn;
    myTrustedSaveAs = app.trustedFunction( function ( doc, oArgs ) {
         app.beginPriv();
              var myTrustedRetn = doc.saveAs( oArgs );
         app.endPriv();
         return myTrustedRetn;
    The developer guide actually wants you to add this content to the existing "config.js" file. I recommend creating a new file, since its easier to deploy in a network. Either way, every client/user who needs to be able to save documents this way, needs this JavaScript Code in his Application/User-JavaScript-Folder.
    Within the Acrobat Document, which you want to obtain a certain file name, you can now use the trusted functions "myTrustedBrowseForDoc" and "myTrustedSaveAs" to store the file. To call the trusted functions and deliver the file name you can either you use a form field (button) or you add a new menu item. Add the following JavaScript Action to the button/menu item and change "Roller Coaster" to the name of the field which contains the value which you want to become the new file name:
    var fileName = this.getField("Roller Coaster").valueAsString;
    try {
         var oRetn = myTrustedBrowseForDoc({bSave: true, cFilenameInit: fileName + ".pdf"});
         try {
              myTrustedSaveAs(this, { cPath: oRetn.cPath, cFS:oRetn.cFS });
         catch(e) {
              console.println("Save not allowed, perhaps readonly.");
    catch(e) {
    console.println("User cancelled Save As dialog box");
    Good Luck!

  • InDesign "Save As" dialog box for every operation in INDB book file; updating page numbers, etc.

    So I haven't used INDB files in awhile in InDesign, and today was the first time I attempted to adjust an old INDB (created originally with CS5).  For every operation of adjusting the book file, such as updating page/section number or adding/removing an INDD file I get a Save As dialog box for each constiuent INDD file.  This is quite annoying since the book has lots of INDDs, and I have to click through the tedious save as with each.  I previously worked with INDBs in CS5, and never encountered this, there was no need to save each INDD in the book just to update the page numbers.  I tried creating a new INDB in CS5.5 thinking that maybe it was because I was working from a file created with an older version of InDesign.  Does anyone know if there is a way to suppress the Save As dialog?  Another thing I noticed that is supremely frustrating is that this new build of InDesign doesn't default to saving the file in its original location, and I have unwittingly ended up saving files in other places, only to later realize it.  I am using InDesign CS5.5 Ver. 7.5.2 on Mac OSX 10.7.3  Any help is greatly appreciated. 

    It will only happen once (and frankly, what you are doing is a very bad idea).
    When you open the old book in CS5, you are converting to the new format. All of the legacy files also need to be converted, even if added to a new book in CS5.5, hence the Save As since ID will not overwrite the old versions until you tell it to (and that's the bad idea). I strongly recommend (though it's too late for any books you've already updated and overwritten) that you either continue to edit in the old version, or that you take the time to open each file in the original version if it's older than CS5, then export to interchange format (.inx or .idml, depending on version), open those files in CS5.5, save with new names so you don't overwrite anything, then add to a new book and proceed.
    One of the reasons I recommend this seemingly time-consuming approach is that there are too many reports (another one yesterday) of some sort of problem that pops up late in the editing cycle when converting legacy files to CS5/5.5 by opening them directly and saving. This is a belt and suspenders insurance approach, and is far less labor intensive than starting over, which might end up being your other option down the road if something goes wrong.

  • Save as dialog box hides behind the dock

    Ever since upgrading to Yosemite, the 'save as' dialog box will partly hide behind the dock. I can't see the 'save' nor the 'cancel' button.
    Now I don't want the dock to auto hide, nor do I want to make it so small I can hardly see the icons, because when I do either of that I can of course see the buttons. I can therefore only cancel by pressing escape. Since that is not really efficient working for me, this minor issue annoys me to no end.
    I use Word for Mac 2011 and have never had any issues with it before. This also only happens when creating Word documents in print mode view (changing the view makes the issue go away but when I go back to print mode view - which I have always used, the buttons are hidden behind the dock again!) I would appreciate any help ...

    I have the same issue with Chrome, it's very annoying, especially since the "New Folder"-Button is hidden underneath the dock as well.
    When placing the Dock on the left, the Dialog even disappears underneath the screen.
    Retina Macbook Pro, running 10.10.

  • Bug: Navigation: Save As Dialog Boxes in Windows (thus any application) goes to Computer Drive C - instead of Quick Access

    Bug: Navigation: Save As Dialog Boxes in Windows (thus any application) still have its legacy behavior implemented and navigates to a computer drive, by preselecting and letting the user start at Computer > Drive C - instead of Quick Access.
    This is simply a forgotten correction after Quick Access has been introduced that needs to be corrected for Quick Access to work effectively (in a valuable way for the user) with files not just during create and modify operations on files - but also Open
    file - using File Dialog Boxes (although users may use launch instead for Opening files using i.e. Explorer or navigation from shortcuts on the desktop).
    This missing change of File Dialog Box behavior is unintended and now contradicts the new design with Quick Access for faster navigation (so you should not have to start with a scroll and extra navigation to look for Quick Access (contradiction:
    i.e. QUICK Access)
    Please support the new navigation provided by Quick Access intended to give Quick Access - thus Save As must be able to start here.
    For variability, may be provide an overriding option in Explorer>Folder Options>General (if you change the default behaviour in the File Dialogue) to have Save As start at Computer > Drive C.
    ! Remember to do the change for the Common File Dialog as well - used by most widespread software applications in the Adobe software applications portfolio, i.e. Adobe Photoshop CS6

    Thank you for your time and response! Unfortunately, we have the machine locked down pretty tight (they are public use computers that require heavy restriction) and it is set to restrict all drives so access is limited to the local profile. We did try
    testing your method, however, by adding the Desktop as an allowed location in the Office policy (which would not solve the issue for the other applications but was good for a test) using the path %userprofile%\desktop. When choosing that location, it does
    not throw the error but unfortunately, it does not remember like it did for your with the E: drive so it still always throws the error when first loading the dialogue box no matter what I do. If you're able to confirm that this is simply by design and we're
    just expected to inform our users to click through the errors, then I guess that's the accepted answer. Although, do you think that there might be a registry key value that is set after you save to the E: drive for the first time? Maybe we could set that value
    to %userprofile%\desktop if it's doing the redirection after the first save through registry. Thanks again!

  • Editing the folder links in DW,FW "Open/Save As" dialog box

    i found apps to change the folder links in the left column of my various Windows7 Open/Save As dialog box, but it doesn't affect those in DW,FW. is there a way to do this?
    thanks
    GN

    Take a look at this:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_17216&sliceId=1
    Bryan Ashcraft (remove BRAIN to reply)
    Web Application Developer
    Wright Medical Technology, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "eliblow" <[email protected]> wrote in
    message
    news:fjkqvv$gig$[email protected]..
    >I would like to create open Save As dialog using
    ColdFusion. The user will
    >be
    > clicking a button and the dialog will pop up asking the
    user if he want to
    > save
    > the file. I know that it can be done using JavaScript,
    but I am not sure
    > how it
    > could be done with CF. any suggestions?
    >
    > Thank you in advance.
    >

  • Download File across Save As dialog box

    Hi.
    How can I download a file (.txt) from JSP page, across a Save As dialog box?...
    I don't sure. I using this algorithm, but this don't work well:
    String fileNameArchive = "C:\\Consulta.txt";
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition","attachment;filename=" + fileNameArchive);
    java.io.BufferedInputStream bis = new java.io.BufferedInputStream( fileDetailStream);
    Thank you very much by any help.

    The root of the webservers changes from server to server and
    sometimes it depends on the path you run webserver exe.
    The best i have found to overcome this kind of problems is by
    using getResourceAstream() method which basically looks at classpath locations only, but still this has some problems like it should kept at the
    specified classpath becoz the getResourceAsStrem() method is not static
    method and it always associated with the class object and the file
    accessing also should be in the same package/classpath.
    by using getResourceastream you cannot look at other places (except classpaths)
    and this should be used only if you looking for .properites definitions.
    the Second best method is
    see you have a file called "context.txt" right
    before you create a file, first create a directory at the root, let say
    "\tmp"
    and then create a file \tmp\context.txt
    and then open an output stream to it either using fileoutputstreamm...
    and then write all output content to servlet/client output stream.
    this will be the best becoz you are specifying the "\" the root
    and this is common for all operating systems and definitely it will create at the root directory either serverroot or harddiskdrives root
    so you will never missout and the exceptin will also not comes along the way
    cheers..
    if you get new thing , let me know
    bye
    with regards
    Lokesh T.C

  • 'Save as Type' box in 'Save As' dialog box

    I recently downloaded 'Rocket PDF' and now if I try to save any PDF. document, the only choices in the 'save as type' box are 'Rocket PDF' or 'All files'. No more 'Adobe Reader PDF. appears as a choice. I uninstalled 'Rocket PDF' and in the 'Default changes' I put 'Adobe Reader as the default to open 'PDF.'. Still, the only choices on the 'save as type ' are 'Rocket PDF' or 'All files'! How do I get Adobe Reader PDF' back as a choice in the 'save as type' box and delete 'Rocket PDF' as a choice?

    Sorry I wasn't clear! When I try to save a 'PDF' file the "save as" dialog box opens. At the bottom the 'file name'is listed and below that it says, "save as type". You then pick what file type you want, like Adobe Reader for PDF. It used to say Adobe Reader as one of the choices but when I downloaded "Rocket PDF" it only says "Rocket PDF or "all files" as the only choices to save the document, no more Adobe Reader as a choice. I have deleted Rocket PDF and under 'default programs (Start button) I have set the "Pdf. files to open with Adobe Reader. Rocket PDF is still listed or' all files', nothing else! How can I get Adobe Reader as a choice back in the 'save as type' box?
    Thanks for any help.

Maybe you are looking for

  • Process Orchestration - Configuration Wizard "Process Integration and Orchestration Package" shows running

    Hi SAP Gurus, I have installed an SAP PO system and am running the Config Wizard from NWA. The functional unit I have selected from NWA is - "Process Integration and Orchestration Package". This functional unit has in turn selected few more functiona

  • Arranging function definitions in Designer

    1.How can I arrange PL/SQL functions in generated scripts that called function come first and calling function in the next? Without this arrangement, during creating PL/SQL functions errors appear on the screen as the following: Errors for FUNCTION G

  • In condition records section Search help problem at one data type

    hi there, we are upgrading 4.6c version to ecc 6.0 past january. but in vk11/vk12/vk13 condition master records sections, we have a problem for one data type search help. when we want to join sales deal code to sales detarmination condition, at one t

  • Arrangement of jar containing main class

    Hello all, usually it is required, that that jar file (let me call it "main jar"), which contains the main class (by which the application is entered), has to be the first jar in the order of the jar files within <resources> of the jnlp file. Now if

  • DISABLE VIEW, FUNCTION, PACKAGE

    Hi all, My export/import is having error in its logs becuase there are invalid objects like views, functions, packages, etc whis is caused by a missing db_links. This dump was taken from PROD so the link there exist. But we are importing it to the DE