Is it possible to use an AppleScript to set a *custom* paper size in Word?

I've used the following script to set the paper size in Word:
tell application "Microsoft Word"
          set paper size of page setup of section 1 of active document to paper a4
end tell
but I've been unable to write a script to set a custom paper size -- does anyone know if this is possible?
Thanks!

The gallant Pierre strikes again!!!  For reasons having to do with a quirk of working with Word documents coming from a Windows machine, I ended up having to go the UI route, but I couldn't have done it without you!  I actually ended up changing the Format For: popup menu instead of the Paper Size: popup menu, but this technique could be used for those who wish to chose a custom paper size:
tell application "Microsoft Word"
  activate
end tell
tell application "System Events"
          delay 0.5
  keystroke "a" using command down
          tell application process "Microsoft Word"
                    click menu item "Page Setup..." of menu "File" of menu bar item "File" of menu bar 1
  delay 1
  click pop up button 3 of window "Page Setup"
  keystroke "Any"
                    delay 0.5
  keystroke return
                    delay 0.5
  keystroke return
  delay 1
                    click menu item "Print..." of menu "File" of menu bar item "File" of menu bar 1
  delay 1
                    tell menu button "PDF" of window "Print"
  click
                              click menu item "Create Booklet" of menu 1
                    end tell
          end tell
end tell
Again, Pierre -- many thanks!
Andrew

Similar Messages

  • Can't use units other than inches in custom paper sizes?

    When I try to define a custom paper size, the editable fields contain the unit "in". If I change this to anything else, like pt or cm, it gives an "invalid number" error message. I intend to file a bug report, but am I missing something here?

    You can set your system measurements to metric in the
    International control pane, under Formats. That will
    change it for Page Setup.
    I'd swear in a court of law that I tried that and it didn't work. Now I try it and it does let me use cm. However, if I try to use m or mm, it assumes I meant cm, and if I try pt, the units I really wanted to use, it still says "invalid number."

  • Problem Managing Custom Paper Size Using Epson RX500

    Since updating my Mac to the latest version Yosemite, when I now try to Manage Custom Paper Size in the Epson print box via my Photoshop Elements 11, Photoshop crashes. Has anyone experienced this problem? If so have you found a solution please?

    Hello Bridge. Thanks for the reply. I am not sure where the Elements Print dialogue is but, having come back to answer, I can see the "More like this" box on the right and viewing those posts confirms what you say. It would appear from one of the posts that Apple is aware of the problem and may be working on it. However, one of the posts opposite suggested using Print Preview to set the custom print size and print from there. I found this works for me. So, thanks again for your consideration. Regards. Brian.

  • Problem Managing Custom Paper Size Using Epson

    Since updating my Mac to the latest version Yosemite, when I now try to Manage Custom Paper Size in the Epson print box via my Photoshop Elements 11, Photoshop crashes. Has anyone experienced this problem? If so have you found a solution?

    Hello Bridge. Thanks for the reply. I am not sure where the Elements Print dialogue is but, having come back to answer, I can see the "More like this" box on the right and viewing those posts confirms what you say. It would appear from one of the posts that Apple is aware of the problem and may be working on it. However, one of the posts opposite suggested using Print Preview to set the custom print size and print from there. I found this works for me. So, thanks again for your consideration. Regards. Brian.

  • How to add a new custom paper size? I am using a HP Deskjet 1000 J 110a printer.

    How to add a new custom paper size? I am using a HP Deskjet 1000 J 110a printer. I am using Windows XP home edition. The Custom option itself is not appearing in the process of selecting paper sizes in Printing preferences. I have installed this printer just today, but I bought it eight months back in Dubai. Could there be chance that since I purchased it in Dubai and I am using it in India, the software's not functioning properly. 
    Can you please help me with this problem immediately? Reply soon...

    Hi RajeshPujara,
    Please refer the link below to know the paper size supported by this printer.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02231304&tmp_task=prodinfoCategory&cc=us&dlc=en...
    May I know the size of paper you are trying to print.
    Although I am an HP employee, I am speaking for myself and not for HP.
    --Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • Ever since the up dates... Any of my photos that I use and want to set as wall paper... The software blows the picture out of portion and no way of cropping it and keeping it at the regular size!!!! How can this be fixed!!

    Ever since the up dates... Any of my photos that I use and want to set as wall paper... The software blows the picture out of portion and no way of cropping it and keeping it at the regular size!!!! How can this be fixed!!???

    Hope this helps:
    http://ios.wonderhowto.com/how-to/fixing-ios-7-wallpaper-woes-scale-crop-align-d esign-perfect-iphone-background-0148750/
    Please reply with any further questions.

  • Preview buggy when printing multiple pages per sheet using a custom paper size

    I have a square book I've designed and I've printed the pages to a PDF. Now I'd like to re-print the pages so you can see facing pages together exactly like when, in preview, you select "View > Two Pages".
    Each page is 12x12 so I'd like to re-print them to be 24x12 (24-wide)
    I was previously able to do this in preview (prior to mountain lion) using the "layout > two pages per sheet" option with a custom paper size but when trying with Mountain Lion, the print-dialog preview doesn't match the output when saved as pdf; pages either get shrunk or cropped without my permission and it generally seems to be buggy. I've been playing around with it for over an hour and can't get two pages side-by-side to take up a full 24x12 custom virtual page when saved as PDF
    I would expect the print preview to accurately display what will be printed (saved as PDF) and I am guessing that maybe the printer selected (HP all-in-one) is affecting the preview and save to pdf options?
    Can someone tell me how to achieve a printed rendition of the "view > two pages" layout?

    I have a little more information. I turned on "single hairline" border and as you can see, it's converting my square pages into "US Letter" pages BEFORE applying them two-to-a-page. So it's using my selection of "Paper Size" as both the source and destination paper size, rather than just the destination size, because my source is obviously 12x12 square (confirmed by looking at page properties in preview). Apple, please fix this

  • Unable to Set Custom Paper size setting of 15 (width) x 12 (Height) using J

    Hi,
         I am unable to print the report using the custom paper size setting of  15 (width) x 12 (Height)  with printer friendly fonts so that we can print on Line or dot matrix printer.
         This problem is not solved from last 3 months and we dont get help anywhere.
         We are using Java with Crystal Report XI R2 design for the same. 
                           ITable table=null;
    DatabaseController dbCtrl=null;
    ReportClientDocument oReportDoc=null;
    try {
    String reportName=fileName;
    oReportDoc=new ReportClientDocument();
    oReportDoc.open(reportName,0);
    dbCtrl = oReportDoc.getDatabaseController ();
    rs=ad.sqlStringBigST(query);
    table = dbCtrl.getDatabase ().getTables ().getTable (0);
    dbCtrl.setDataSource (rs, table.getName(), "Runtimeres");
    Object oreportSource=oReportDoc.getReportSource();
    IReportSource reportSource=(IReportSource)oreportSource;
    PrintReportOptions printOptions = new PrintReportOptions();
    printOptions.setPrinterName("EPSON FX-2175 ESC/P");
    printOptions.setPaperSize(PaperSize.useDefault);
    options.setPaperSource(PaperSource.manual);
    oReportDoc.getPrintOutputController().printReport(printOptions);
    } catch (Exception e) {
    System.err.println(e.toString());
    Please let me know what is the solution for the same.
    Regards,
    Raj

    Hi,
        Yes i can understand that you need to first understand the root of the problem to give me the solution.
        I am here to answer to your questions until you understand what is the problem.
        Yes if i set the standard page size which are given in API doc , it sets up the page correctly.
        Following page size as given in the API doc works fine.
        http://devlibrary.businessobjects.com/businessobjectsxi/en/en/RAS_SDK/rassdk_java_api_doc/doc/rassdk_java_apiRef/com/crystaldecisions/sdk/occa/report/document/PaperSize.html
       It is rejecting the custom paper size and custom fonts (which in my case are printer friendly fonts).
    Regards,
    Rajshekhar SIpoy

  • Using Group Policy to Set Windows Font DPI size

    I was in need of a way to change the Windows 7 user interface to use the Font size of 100% (vs the default of 125%) for custom applications on our network.
    Many searches on the net did not provide an easy way to accomplish this via Group Policy. The font size is PER USER and not PER MACHINE.
    I found a method using Group policy preferences (GPP) to configure the Font DPI size and wanted to share it for others who might need to do the same...
    I created a new GPO for the users needing this font size and linked it to their OU. Then configured the following:
    User Configuration \ Preferences \ Registry (Right click and select NEW \ Registry Wizard)
    Configure the following DWORD key: HKEY_CURRENT_USER\Control Panel\Desktop\LogPixels
    Use the values as needed:
    00000060 (Small Font Size 100%)
    00000090 (Medium Font Size 125%)
    00000144 (Large Font Size 150%)
    I used 00000060 to set the Small Font Size of 100%. Gpupdate /force a test client machine, then logoff/logon and see the setting take effect.
    When users try to change the font size in via the control panel, the value will be overwritten the next time the group policy updates. Id even recommend preventing users from being able to change the font dpi with another GPO setting:
    User Configuration \ Policies \ Administrative Templates \ Control Panel \ Personalization \ Prohibit selection of visual style font size = Enable
    Just wanted to share this for anyone needing to change the Windows 7 default font DPI size en mass using Group Policy. We can thank Microsoft for not giving us a ADMX template for this issue!!!!
    Drumgod
    me

    User Configuration \ Policies \ Administrative Templates \ Control Panel \ Personalization \ Prohibit selection of visual
    style font size = Enable
    This policy setting states that it is supported on Windows Server 2003, Windows XP, and Windows 2000 operating
    systems only. 
    The description on this setting says that it disables the "Font size" drop-down list on the Appearance tab in Display Properties. This does not exist in Windows 7. I don't think the DPI setting you are talking about is the equivalent.
    The other setting is good to have enough. Thanks for the tip!

  • Is it possible by using boot camp to set up a high spec mac pro to operate as a pc server for a network of approx 20 pcs

    My company has recently bought a high end mac pro to act as a mac server. However it is no longer need but business does need a new server for a network of about 20 pcs. Is it possible or practical using boot camp to tuen the mac into a fully funtioning pc server?
    jb

    Thanks for the info. I don't have Server 2008 but the Boot Camp documentation says Windows 7 only is supported. Glad you jumped in knowing that Server 2008 is supported.
    In the original poster's post he said he wanted a fully functioning server so I assume he wants Server 2008. If he is misusing the term server and only needs a peer network then he can install Windows 7.

  • Is is possible to use AdobeLibraryAPI.js to create a custom library on Android

    With the iOS App Builder, we are allowed to upload our own custom library Zip file.  The library uses AdobeLibraryAPI.js to interact with entitlement and fetch folios. 
    We are having problems trying to implement the same custom library from our iOS app into our Android app.  Specifically, the login api calls are failing...

    Adobe Reader for iOS doesn't support forms. A few non-Adobe PDF viewers have some support. The one that is the best at this time is Readdle's PDF Expert, which also has decent support for JavaScript, so calculations are supported.

  • How do I use an extension to set a default font size and page zoom on web pages.

    every time I go to a site I have to zoom in 3 times. I saw an answer that said use an extension to fix the zoom so it would stay where I wanted it. It gave two extensions to use, but I don't know where or how to apply them.

    Here are two I've tried in the past:
    * Default FullZoom Level: [https://addons.mozilla.org/firefox/addon/default-fullzoom-level/]
    * NoSquint: [https://addons.mozilla.org/firefox/addon/nosquint/]
    After installing an extension and restarting Firefox, you can use the extension's Options dialog to adjust the starting zoom level. If the extension doesn't have its own menu entry or toolbar button, you can usually find that Options button here:
    orange Firefox button (or Tools menu) > Add-ons > Extensions category
    Any luck?

  • Can't use custom paper size in OfficeJet 7000

    I"m trying to print invitations and returns on my OfficeJet 7000 Wide Format and it seems like half-sheet size paper is not supported. Anyone have experience / success / a clue? Thanks!

    Hi,
    Custom size is not supported for the printer on Windows OS:
    NOTE: Custom-sized media are only supported on Mac
    Under Paper-handling specifications > Supported custom sizes:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02858465&cc=us&dlc=en&lang=en&lc=en&product=432...
    Try adding an alternative driver and check if that may help:
    Right click the printer icon and select Printer Properties.
    Open the Ports tab, take a note of the checked port and close this window.
    Click Add a printer and select a Local Printer.
    select the same port as used by the pritner and follow the steps.
    At the model selection screen select HP, then select HP Deskjet 6940 / 6980.
    Now try printing a custom size using the added driver and check if that work.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • How to use a variable value set from custom dll in dataset

    Hi,
    I've inherited a SSRS report that I need to add some functionality to.  I'm setting a variable, ADAuthorizations, from a custom dll 
    ADAuthorizations is a string of all AD groups a user is a member of and I need to use this as a filter in a dataset.  I've tried using this variable as shown in the query below but I'm getting an error "The expression used for the parameter 'Unit_Permissions"
    in the dataset "Unit_Permissions" includes a variable reference.  Variable values cannot be used in query parameter expressions."  Is there another way I should go about doing this?   
    = "SELECT UnitCode, UnitName " &
      "FROM dbo.VW_Unit_Permissions " &
      "WHERE UserId in (" & Variables!ADAuthorizations.Value & ")" &
      "ORDER BY UnitName "
    Thanks,
    Robert

    Please follow below steps,
    1. Create a custom code to get all the users in an array,
    Public Function getUserName() As String()
       dim Users(1) as string
       Users(0) = "user1"
       Users(1) = "user2"
    return Users
    End Function
    2. Create dataset using the below query,
    SELECT UnitCode, UnitName FROM dbo.VW_Unit_Permissions ORDER BY UnitName
    3. Add a parameter @User and set properties : (Datatype as text, Allow multiple values, Visible)
    Under "Available Values" select specify values and set the label and values as expression.
    =Code.getUserName()
    4. Similarly for "Default values" as
    =Code.getUserName()
    5. Go to tablix properties and select the filter tab and set the properties as below,
    - Select Expression "UserId" i.e =Fields!UserId.Value
    - Operator as "IN"
    - Value as =Parameters!User.Value
    6. Preview the report.
    Regards, RSingh

  • Can't print using custom paper size for HP6520

    I'm trying to print Hobby Lobby RSVP cards for a wedding. The size is 5.5" X 8.25". My HP6520 keeps giving me an error that the printer has detected a different size of paper and it won't print. I've gone to Custom and set the size to match, but it still won't print. I have the paper in the bottom tray.

    Hi @Saltman1,
    Welcome to the HP Forums!
    I noticed that you cannot print on a Hobby Lobby RSVP card size is 5.5" X 8.25" with your HP Photosmart 6520 on Windows 8. I am happy to look into this for you!
    According to your printer's specifications, this is an unsupported card size for this printer. The supported card sizes are:
    Card type
    Card size
    3 x 5 in Index
    76.2 x 127 mm (3 x 5 in)
    4 x 6 in Index
    101.6 x 152 mm (4 x 6 in)
    5 x 8 in Index
    127 x 203.2 mm (5 x 8 in)
    However, as a workaround, you might be able to assign an alternate driver by going to this post, How to Assign Alternate Print Drivers in Different Versions of Windows, by @Shane_R, and then doing a custom size print by going to this guide, Create Custom Paper Sizes in Windows 7, Windows 8, and Mac OS X.
    Otherwise, I would suggest getting the proper size of paper for this printer as indicated in the chart above.
    Hope this information clears things up for you, and have a great day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

Maybe you are looking for

  • HT4997 The imported videos by Itone is not showing up on iMovie

    I downloaded YouTube videos by download helper Firefox adds software and then I convert it to MP4 by airvideo apps for ipad. Then I transfere it by I tone as was described on the help section, but still these videos are not showed up on iMovie on ipa

  • Switch statement to java string

    Hello! I am programing a form in jsp that will send an e-mail to different people , depending on the selection of a SELECT box. I am using a Bean which will take the option chosen in the select and then prepare the message. My problem is that the opt

  • Indesign - Wordpress workflow

    I'm wondering if anyone has used an Indesign-Wordpress workflow before? My goal is to have the content and use it in two different products - one produced in InDesign and one produced as a Wordpress site. I've been digging but haven't found any solid

  • HT2486 address book 4.1.2 is not launching with snow leopard 10.6.8

    address book 4.1.2 is not launching with snow leopard 10.6.8

  • Need to keep Java 5 updates with Java 6?

    I have Java 6 with 3 updates. Is it necessary to keep the 5 updates I have on my computer from Java 5? They take up quite a bit of space.