Inserting a Text Box? - Applescript

Thanks for helping me out earlier. Now I want to insert a text box at the bottom of the page 4.5 inches wide and .5 inches tall, how do I script that in?
This is all needed as part of a workflow I am doing with automator, and once I can solve that, then I am DONE!
Here is my apple script:
tell application "Microsoft Word"
  activate
          set orientation of page setup of section 1 of active document to orient landscape
          set mar to page setup of active document
          set left margin of mar to (inches to points inches 1)
          set right margin of mar to (inches to points inches 1)
          set top margin of mar to (inches to points inches 0.7)
          set bottom margin of mar to (inches to points inches 1.5)
          set alignment of paragraphs of active document to align paragraph center
end tell
Thanks.

Hi,
Here is an example :
tell application "Microsoft Word"
      activate
      tell active document
            set orientation of page setup of section 1 to orient landscape
            tell its page setup
                  set pWidth to page width
                  set lMargin to inches to points inches 1
                  set left margin to lMargin
                  set right margin to lMargin
                  set top margin to (inches to points inches 0.7)
                  set bottom margin to (inches to points inches 1.5)
            end tell
            set alignment of paragraphs to align paragraph center
            set nP to (count paragraph)
            -- the doc must have at least two blank paragraphs at end of it before creating the textbox
            if (content of text object of paragraph (nP - 1)) is not return then insert paragraph at after last character
            if (content of text object of paragraph nP) is not return then insert paragraph at after last character
            select text object of last paragraph -- select the last blank paragraph
      end tell
      create textbox selection
      tell last text box of active document
            set height to inches to points inches 0.5
            set width to inches to points inches 4.5
            set content of text range of its text frame to "something" -- set the content of this text box
            set left position to ((pWidth / 2) - (width / 2)) - lMargin -- center the text box, no center alignment in AppleScript
      end tell
end tell

Similar Messages

  • Inserting a Text Box

    When I insert a text box on my web page, I find it can be anywhere on the page and I have to set about looking for the blinking cursor. It may be in another box with text covering it or in a photo box. Is there a way that the inserted box can have a larger, darker graphic box? Am I doing something incorrectly in inserting the box?

    Bocamama wrote:
    Is there a way that the inserted box can have a larger, darker graphic box?
    As soon as you have inserted the text box, in the Inspector's Graphic tab, under Stroke choose Line and optionally increase the thickness of the line from 1 pt to 2 or 3 pt. That will make the box easy to see whilst working with it. (Revert back to Stroke - None before publishing.)
    Am I doing something incorrectly in inserting the box?
    I don't think so.

  • Automatic insertion in text box?

    Hello,
    Here is the problem...I have existing .indd document, and it needs to be printed into large number of pdf files. Each pdf file must have different text in one textbox (located in master frame). Is there any way i could automate the process? Not so much for printing, but for automatic insertion of that text line by mouse click/command? I figure that automatic printing would be difficult, since each file goes to different folder...
    This would not be the case if it was one time job, but I am doing it manually for a long time, each several days
    Thank you for answers

    Thank you peter, with Data Merge I have managed to do exactly what I wanted, even easier than i taught it could be done, using Excel
    Automatic printing to specified folders and automatic shifting of data fields seems like to complicated, and like something indesign was not designed to do...so it can be skipped Tnx!

  • Why can't I resize a text box in the new Preview in Yosemite?

    I just upgraded to Yosemite, and I am having trouble with the new Preview.  I am a student and my notes are pdfs.  I have been using Preview to take notes on the pdfs for the past two years.  I have always been able to insert a text box, make it a certain size (resizing it using the text box function and dragging the corners/sides to fit the space in which I want to type), and type easily.  In the new Yosemite Preview, I can insert a text box, but I can only resize it horizontally (not diagonally or vertically), and when the text reaches the right edge of my box, it moves upwards instead of continuing the text downwards (the entire box shifts up so that my typing line is in the same position as where I started and the previous text is now above).  Is there any way to get around this?  I really don't want to purchase software just to be able to easily add text to a pdf.

    I find it annoying too. Also, when you want to add text, you always need to open the title bar and then to text box always goes in the middle of the document. The only way I found to get over that issue was to ask my friend to put Preview 7.0 on a USB key (he is still on Mavericks) and then I dragged it in my application folder. It works for some PDFs but not for all of them unfortunatelly...

  • Pages 5.1 Text box problems

    In Pages 5.1 when I paste a graphic in a text box (e.g., a PNG file), it no longer stays in the text box.  This was a great feature in Pages '09, the ability to paste a graphic into the text box, add figure legend text, and a line around the whole thing and have it remain as one unit.

    If you still have Pages v4.n located in /Applications/iWork after the v5+ upgrade, I would recommend you revert to an old friend.
    In v5, you insert the Text Box, then from the Format > Style > Fill, you choose Image Fill, Scale to Fit (or Fill), and then Choose.. to pick your image from disk. The Toolbar media choice will just plop an image over the top of your Text Box. Dragging and dropping an image over the Text Box places the image behind the Text Box. This can lead to an interesting crop effect.
    If your image choice will be too dark to see the original black Text Box "Text" placeholder, then you may want to initially choose a lighter font before paragraph 2 above. Othewise, a double-click after the image fill will provide edit focus in the Text Box. A downside is that changing the opacity will effect the image and the text.

  • Adobe Acrobat 9 Pro - editing font properties in a text box

    When I insert a text box on an existing PDF, initially Acrobat usually allows me to edit the font properties.  Sometimes it does not.  Once I type in the text box, the font properties toolbar becomes locked (i.e., "grayed out") so I can't change font type, size, color justification and other font properties.  If I save the file, close it and then re-open I can edit then the font, at least for a while.  If I have other PDF files open too I usually have to close those other windows.  After some time the font properties again become locked.
    Obviously it is incredibly inconvenient to have to close a program and all open files then re-open those files just to change something like the color of a font.  I called Adobe tech support and they told me the fix was to buy Acrobat X.  I don't want to spend more money, I just want the product I already paid for to work properly.
    Is there a way for this bug in the software to be corrected?

    ** SOLVED FOR ME **
    Acrobat 9.0 and 9.1 Standard
    No v9 properties toolbar access except in last document opened
    I don't know if this applies to you but I had a similar problem with documents on our network.
    It turns out the documents were being saved as PDF/A or PDF/X format.
    I had the users open up Adobe.  Go to Edit>Preferences      Then go to the Documents section and find the "Open in PDF/A" section.  I had them select "Never"  and then the toolbars were no longer greyed out.

  • How do I change the font size and color in a text box in Adobe Acrobat 9 Pro (ctrl e does not work)?

    I need to mark up scanned pdf documents with text box comments. I can insert the text box and type text but I cannot change the font or color. When I press Crtl E, no tool bar appears in the menu bar. What does appear in the menu bar is "No current selection". Please advise.

    I am already doing that: creating the text box, typing the text, selecting the text i.e. highlighting the text. This morning, for a scant minute, the properties tool bar appeared and I was able to refine the text in a text box. Then it disappeared never to be activated again this morning.
    I work half of my weekly hours at this client office and I only have this problem on their pc and adobe software (version 9 pro). When I am home, my laptop and the adobe software (version 10 pro) is fine. I can create the text boxes and refine the format at will with no issues. Could it be a software version and/or update issue? Thanks for any assistance.

  • I keep getting crashes and error messages when trying to use LiveCycle. So far, the most I have been able to is create and name 3 text boxes.

    Despite having uninstalled, reinstalled, change compatibility, run as admin and a host of other "fixes", LC keeps crashing, closing out and otherwise failing to operate. At this point the most I have been able to accomplish has been inserting 3 text boxes and then naming them. As soon as I change the caption name on the 3rd box (or sooner) the program stops working and I get the wonderful message from windows telling me, the program has stopped. I needed the extra input from Windows because, you know, when the program crashes I was just thinking it was naptime.  2.5 hours I have spent so far trying to fix this. Someone please help me!!

    I am not sure what you mean by "Flash Player for steam"; the only Flash Player installers I know is the ActiveX (for Internet Explorer) and the plugin (for other browsers); you can find both at http://helpx.adobe.com/content/help/en/flash-player/kb/installation-problems-flash-player- windows.html#main-pars_header
    [topic moved to Flash Player forum]

  • Help - text boxes/highlighting hidden unless selected in Acrobat Pro 9.2

    I am working Acrobat Pro 9.2. When I insert a text box, it disappears when I click somewhere else.  I can only tell it's there If I hover over it - I get a black mouse arrow.  If I click on it and select it, then I can see the text and border, but if I click anywhere else, it disappears.  I've tried all the options and settings I can find.  It is set to show, not hide, all comments and text boxes.  Also, when I try to highlight regular text, it puts a little yellow, symbol above my text but does not highlight the text.  When I roll the mouse over it, a yellow note pops up with the text I highlighted, but when I move the mouse away, nothing is highlighted.  Again, I've tried changing all of the settings I can find related to highlighting but nothing works.  I use Acrobat on other computers and have used both text boxes and highlighting without any problem.  Is this due to a setting somewhere, or is there something wrong with my installation of Adobe?   Thanks.

    Something to check.
    To have text selected by the Highlight tool placed into the annotation's pop-up:
    Preferences > select Category "Commenting"
    There are three panes of configuration options.
    --| View Comments
    --| Pop-Up Open Behavior
    --| Making Comments
    Tick the last option (Copy selected text into Highlight, Cross-Out, and Underline comment pop-ups) in the third pane.
    Play with the other options as you may find others that are very useful.
    For form fields:
    Preferences > select Category "Forms"
    In the first pane (General), select "Show focus rectangle".
    In the second pane (Highlight Color) select "Show border hover color for fields".
    Be well...

  • How to insert independent text column in pages ?

    hello,
    I have made a flyer from one of the templates in pages..
    What I wnat to do is insert another text colum indicated at the attachment. I just con not figure out how to do it.. It keeps insertin within the main text..
    any help will be appreciated.
    Gokce
    oopss.. how do we attache images here ?
    Message was edited by: Gokce

    Gokce,
    Have you tried inserting a text box? If not, click on View > Show Layout to enter the layout view. Click in the gray margin area to make your cursor disapppear. Then click on Insert > Text. The box will be defined as Fixed on Page (because you clicked in the margin area), allowing you to move it anywhere on the page. You can resize it to look just like a column, then put text in it.
    Hope this helps.
    -Dennis

  • Font in text box

    Hi everyone,
    Is there a way for me to set the default font for a text box, so that everytime when I open one, I don't have to customize it again and again, over and over?
    Thank you very much
    Kelv

    Sure. Open the blank template & insert a text box, click in it & choose the font, size, color, etc. you want in the fonts panel or format bar. While you're at it resize the box if you want, set the amount of extra space in the wrap inspector, etc. You can do similar changes to inserted objects & tables. Delete each text box, object & table after you've set them. Now, save this document as a template & select that template as default in preferences. If you decide to make any changes to the template down the road, just Save As Template again with the same name & replace the previous version.
    While you're at it, set any default text styles you want. Now, save this as a template then, in Pages > Preferences, select this template as the default for new documents. All of your new documents will have these settings for inserted objects, images & tables. Unfortunately, the settings won't apply to any other templates or "foreign" documents you open with Pages.

  • Text boxes and exporting to pdf

    I am making my wedding invitations in PAGES. I have inserted a text box on the sheet, and have the text box outlined by a light grey line so when it comes time to cut the invites, I have a guide. I have adjusted the page margins so that there are no margins. The corner of one of the text boxes is flush with the corner of the page (thus only 2 lines of the text box show).
    I exported this to PDF, and it looks great. I print it on my prnter at home, and everything looks great. However, when I print the PDF from my PC at work, the text box is no longer flush along the edge of the paper, I can see the complete outline of the text box. I thought as soon as it is in PDF format that it should not change no matter what printer you are using.
    Help?

    Three possibilities:
    1 The text box has an opaque background
    2 You have a drop shadow off the text box.
    3 You have some kind of stroke on the box.
    Turn them off by setting them to none in the appropriate tab in the Inspector
    Peter

  • Text Box in Table Cell

    I'm attempting to insert a text box into a table cell but can't. I can't drag one in there either. Are there settings I need to adjust to make this work?

    I don't believe you can insert a text box into a table cell, but you can place a text box on a table cell. The trick is to make the text box floating with wrap turned off.

  • How can I have a button that will show/hide a text box and images on the same page?

    I have a page like below:
    I want to make so that those 3 buttons show different text under them when they are each pressed. How can I achieve this?
    Thanks.

    Hello,
    Please try using Tooltip Composition Widget to achieve that..
    You need to customize  the trigger as the button  and you can use the target to insert desired text box or images.
    you can find this in Widgets library panel > composition
    Please let me know in case you need any other clarification on that.
    Regards
    Vivek

  • Insert text box

    My text box option is grayed out both in the toolbox options and within the "insert" menu. What am I doing/not doing? I click outside the document, click on margin mark, what's up??

    It could be a corrupt preference file
    Trash the com.apple.iwork.pages.plist which you find in "your home folder" > Library > Preferences
    Start Pages again
    If it doesn't work create a new account and open Pages from that account

Maybe you are looking for

  • Error in updating OBNK Table ( Bank Statements and Reconciliations,Manual)

    PLease advise , Bank Statements and Reconciliations,Manual Reconciliation Client is receiving the following message: Error in updating OBNK Table Edited by: Philip Eller on May 20, 2008 9:03 AM

  • Load balancing on 2 pair outdoor AP1300 and 1 switch C3560 each end

    Hi, i will configure four AP1300 and two C3560G with load balancing can you help me. this my design: 1. (AP1300#1 on switch A) <-----trunk via AP1300------> (AP1300#2 on switch B) 2. (AP1300#3 on switch A) <-----trunk via AP1300------> (AP1300#4 on s

  • My phone is stuck on silent!

    My phone is stuck on silent! i have checked the toggle switch on the side of my phone and the ringer is on but all i get when i recieve a phone call is the vibrate. my ipod still works and when i choose a ringtone it does sound. I have tried turning

  • Essbase report script in ODI procedure/variable

    Hi, Is there a way to call an existing report script in essbase in an ODI procedure/variable? BEST! Edited by: 867760 on Sep 1, 2011 2:39 PM

  • Java.util.logging in 10.1.2

    Hi all. We have a j2ee application deployed on Oracle Application Server Containers for J2EE 10g (10.1.2.0.2) (build 050812.1879). We have used the java.util.logging package for our logging and are currently only able to view those with a level of ei