More questions on using AppleScript with MSoft Word

Thank you HD for your detailed reply in the other thread on closing docs in Word using AppleScript.
Here is another qn for all:
How does the "execute find" command work?
The dictionary for Word lists the following:
execute find find
[find text text] : The text to be searched for. Use an empty string to search for formatting only.
[match case boolean] : Set to true to specify that the find text be case sensitive.
[match whole word boolean] : Set to true to have the find operation locate only entire words, not text that's part of a larger word.
[match wildcards boolean] : Set to true if the text to find contains wildcards.
[match sounds like boolean] : Set to true to have the find operation locate words that sound similar to the find text.
[match all word forms boolean] : Set to true to have the find operation locate all forms of the find text for example, sit locates sitting and sat.
[match forward boolean] : Set to true to search forward toward the end of the document.
[wrap find find stop/find continue/find ask] : Controls what happens if the search begins at a point other than the beginning of the document and the end of the document is reached or vice versa if forward is set to false.
[find format boolean] : Set to true to have the find operation locate formatting in addition to or instead of the find text.
[replace with text] : The replacement text. To delete the text specified by the Find argument, use an empty string. You specify special characters and advanced search criteria just as you do for the find text argument.
[replace replace none/replace one/replace all] : Specifies how many replacements are to be made: one, all, or none.
→ text range/insertion point
According to my AppleScript manual, those in brackets are optional parameters. I assume the second find after "execute find" refers to the "find" object, and that this is a compulsory parameter.
I face the following problems:
(1)
If I try to set the text I want to find in the "find" object, I get an error. So this doesn't work:
tell application "Microsoft Word"
          set content of find to "book"
end tell
I get the following error:
error "Can’t set «class 1650» of «class w124» to \"book\"." number -10006 from «class 1650» of «class w124» to «class book»
(2)
If I ignore the "find" object, and use the first optional parameter of "execute find" which is "find text" to set my text to find, I also have an error:
tell application "Microsoft Word"
          tell document 1
  execute find find text "book"
  display dialog result
          end tell
end tell
Error message:
error "Microsoft Word got an error: document 1 doesn’t understand the execute find message." number -1708 from document 1
(3)
So the document is the wrong target for the "execute find" command, fine. But directing the command to the application won't work:
tell application "Microsoft Word"
  execute find find text "book"
  display dialog result 
end tell
Error message:
error "Microsoft Word got an error: Can’t continue execute find." number -1708
Regards,
junxiang99

I know very little about AppleScripting MS Word beyond the fact that it is powerful but unforgiving. I did a Google on Microsoft Word Applescript Execute Find and found quite a few references to the correct syntax.
This is one of them.
Hope it helps.

Similar Messages

  • I want to use applescript with keynote

    I recently purchased Keynote specifically because there is an applescript that purports to run a Keynote presentation and use text to speech to provide narration from the notes on each slide.  I found the script and some supporting materials on http://www.macosxautomation.com/applescript/selfpreso/index.html.  However, this was produced a few years ago and a few versions of applescript and Keynote ago.  So, I need to accomplish the same feat with the current versions of these products.
    But I'm having a great deal of difficulty finding references that tell me much about using applescript with Keynote.
    Can anyone help me out with this?

    If you create an account for him you can setup Parental Controls.
    iTunes: Using Parental Controls
    Create a new Apple ID here.
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/21/wo/mz0CVVrDn8QtH1s 3uYclhM/10.0.31.145.6.3

  • How do use iCloud with Microsoft word, excel and power point? are they compatible

    i am trying to use i cloud with mircosoft word and excel but i am not sure if its compatible. do i first need to purchase pages?

    The kernel failure panic kind of message points to some other activity;
    as such, it may be there could be a conflict in some applications; as a
    logical failure is indicated by the first part of the message content.
    Whether or not any common kernel panic resolution ideas could work
    in regard to the trigger of this action, is another matter & unresolved.
    Reading and understanding the resulting logs is part of this resolution;
    the following link has information on these kinds of issues in general.
    Technical Note TN2063: Understanding and Debugging Kernel Panics
    http://developer.apple.com/mac/library/technotes/tn2002/tn2063.html
    Resolving Kernel Panics:
    http://www.thexlab.com/faqs/kernelpanics.html
    If there were more, perhaps from another error log in the system, to
    point to other contributing factors in the cause of this action & report,
    some course of correction could be indicated; should that involve a
    reinstall of certain programs (and their update files, as Office has) or
    perhaps removing other seldom used applications if they were proven
    to be part of conflict in the system, with Office triggering its appearance.
    Some troubleshooting of this issue may point to some course of action
    and if the problem is only software-based, then it may involve testing
    or moving, or reinstalling some applications. There is a chance, too,
    that something else may be acting up at a low-level of the system. If
    that were the case, sometimes a re-install of the system on a wiped
    and zeroed drive would be a path to consider to test or resolve this.
    But only after other things have been tried. If you have a full backup
    of the computer's contents on a bootable external drive, that would be
    a means of testing the computer itself.
    Good luck & happy computing!

  • Using applescript with iCal

    I have been using an applescript to create a unique combo of new events over the course of a school year for multiple people. I run the script to make a new events in an untitled calendar, export the calendar and then create a new untitled calendar and run it again. 60 or so different times, all with unique combos. I've posted this question to the Applescript forum with no replies, and thought I'd try here. My issue is that when iCal starts to make new events it begins at somewhat arbitrary dates, cycles through the whole year correctly, but jumps around in such a way that it seems to really bog the script down. Now maybe it is a script issue, although this script has worked correctly in the past. Maybe it is a permissions/cache issue (I've run Onyx and it helps with the speed). Currently it is starting to make new events on the 26th of Oct when the year foes from sept 7,2010 to June 7 2011. I'm convinced that I can get that 26th of Oct to change by trashing the cache or something (I'll work on that), a simple restart does not influence it. The script in the end does work, so maybe I'm troubleshooting something that is minor, but I'd love to know the answer! Thanks for the help.
    dan

    So I ran the automation tab of Onyx to repair permissions, execute maintenance scripts, clean the cache... and now when the applescript runs it makes the first new event on a different date than Oct 26...(don't quite remember right now what it is). The question is what is controlling this...??? ARGH
    dan

  • Who Uses Applescript with Aperture and Why?

    From time to time, I come see Applescript mentioned by Aperture Users. The Apple Support website devotes a few paragraphs.
    For an amateur with lots of time. how would Applescript make my experience with Aperture any better? It automates what?

    http://www.apple.com/aperture/resources/pdf/Aperture_3_AppleScript_Reference.pdf
    http://apertureexpert.squarespace.com/forum-applescript/
    http://www.macosxautomation.com/applescript/aperture/publish/index.html
    http://www.macworld.com/article/2033806/import-like-a-pro-in-aperture.html
    There's also an application that will give you lots of statistics on your Aperture library (lenses used, etc):
    http://www.apertureexpert.com/inspector
    I'm pretty sure it uses AppleScript to get the data.

  • Does anyone know if you can use dictation with Microsoft Word?

    I am looking to get Moutian Lion but was just wondering if you can use dictation for Microsoft Word or any other word document program.
    Thanks a million!!
    Beau

    I have personally used it with Word and it does work.  I even think I remember reading that you can use it with any program in which you can type.  Go to settings on your macbook to make sure it's turned on.  Chances are your shortcut to access dictation is pressing the Fn key twice.

  • Question for using ORACLE with SOLARIS

    Hi Experts,
    I have worked Oracle with Linux in one of my projects 2yrs back and i was just a developer, used to write SQL Query, Creating Table and Objects.
    Now i got a question from TL which is
    Tell me about consequences for using Oracle with Solaris?
    I am not worked ORACLE with SOLARIS, Can some one give me the answer for this question with
    1. Difference between ORACLE with LINUX and ORACLE with SOLARIS.
    2. Advantages and Disadvantages Between ORACLE with LINUX and ORACLE with SOLARIS.
    Thanks,
    MuraliDharan V

    Hi MuraliDharan V,
    It would had been better if you had searched first;
    Here is one
    Advantage for Linux64-bit Versus Solaris-x86_64 OS in RAC
    And beside that your question is incomplete:
    -What Oracle? Database, etc
    -Which Version? 9i, 10g, etc
    Aside from that a simple search on google might have answered your question as well.
    But I think there is some new trend of dumping questions here before searching.
    Ex Senior DBA

  • TS4513 For me it is no more possible to use AppleScript in MainStage since 3.0.2 !!! Suggestions ?

    Hello,
    In the 3.0.1 version of MainStage, i used AppleScript to launch some actions.
    In 3.0.2 if i launch any AppleScript from MainStage, the program bug.
    Any suggestions ?
    Thank's !

    Yes, on MainStage 3.0.2, when I associate any applescript to a button (Actions->AppleScript->...) and I turn it, i have this bug : the mixer freezes and when I pass a patch to another, the strips are no longer updated. I have to restart MainStage to restore normal behavior ...

  • Question about using FaceTime with an external monitor!

    Greetings!
    Is it possible to use a third party webcam for FaceTime chat when connected to an external monitor?
    I am currently using a mid-2012 macbook pro.
    Thank you!

    ThatKid26 wrote:...Is it possible to use a third party webcam for FaceTime chat when connected to an external monitor?...
    Yes if the camera is Mac compatible.  It will work with an Apple external monitor with camera.
     As shown in this image using my old Mac Pro and LED Cinema Display:
    when your Mac recognizes more than one connected camera, you can select the camera you want by clicking the appropriate item in the FaceTime > Video menu item.
    Your choices will be different.  In your case of using a MPB, you may also see its built-in FaceTime HD camera.  However, you will be able to choose from compatible cameras that your Mac recognizes.
    If you haven't yet bought, take your MBP along when you shop so you can try before you buy.  That way you will KNOW the answer to your compatibility questions.
    Message was edited by: EZ Jim
    Mac OSX 10.9

  • Question about using RE1000 with EA6500

    I have an EA6500 route but having problem getting wireless signal to one room in my house.  As a result, I am thinking about buying RE1000.
    If I buy this unit, will I need to connect to a different network when using wireless devices in the room near the extender.
    Or will both the extender and router operate as a single wireless network name?  If they both operate under a single wireless name, how will I know the extender is connecting and working.
    Please let me know.  Thanks.

    atomarchio wrote:
    I have an EA6500 route but having problem getting wireless signal to one room in my house.  As a result, I am thinking about buying RE1000.
    If I buy this unit, will I need to connect to a different network when using wireless devices in the room near the extender.
    Or will both the extender and router operate as a single wireless network name?  If they both operate under a single wireless name, how will I know the extender is connecting and working.
    Please let me know.  Thanks.
    Just to answer your question, RE1000 will extend your router's main wireless network - so they will operate with single / same wireless network name. You'll know that the extender is connected and working if you'll be able to see the RE1000 listed on your router's DHCP client's table.
    If everyone needs to believe in something, I believe I'll have another beer..

  • A few questions about using PS3 with 27" iMac display...

    Hey people, I had a few questions about how I could possibly get my ps3 connected to the iMac's 27" screen. First of all, could you guys list some adapters that would be able to convert the HDMI to Mini displayport? That would be great. The only one I know of is that Dr. Bott Digital Video link.
    Okay secondly, I was wondering if I do get the the ps3 connected with the iMac's display with an adapter to convert HDMI to mini DisplayPort, would it be in HD? Would I be able to play ps3 games or watch blu-ray movies in 1080p HD format?
    Thanks!

    Welcome to the Apple Discussions!
    This has been asked a number of times here since the intro of the 27" iMac. The answer is very expensive US$149 or more converters and sometimes even more expensive to maintain the resolutions that you seek.
    http://lowendmac.com/ed/bashur/09db/dvi-to-mini-displayport.html
    Dah•veed

  • Question about using aliases with ASM

    Hi ALL,
    Recently I get using ASM  at test database and I have a question regarding how I can use ALIAS feature :
    I've created alias for one of database file:
    SQL> alter diskgroup DATA add alias '+DATA/test1/datafile/app_data_01.dbf' for '+DATA/test1/datafile/app_data.266.824722429';
    I've tried to see it in v$datafile but unsuccessful:
    SQL> select name from v$datafile where name like '%app_data_01%';
    no rows selected
    Try  use to see in in dba_data_files, unsucessful again:
    SQL> select file_name from dba_data_files  where file_name  like '%app_data_01%';
    no rows selected
    I've tried to use created alias , but unsucessfull again:
    SQL> alter database datafile '+DATA/test1/datafile/app_data_01.dbf' resize 12M;
    alter database datafile '+DATA/test1/datafile/app_data_01.dbf' resize 12M
    ERROR at line 1:
    ORA-01516: nonexistent log file, data file, or temporary file "+DATA/test1/datafile/app_data_01.dbf"
    Could someone, please, clarify how I can use aliases created for files in ASM ?

    Hi ,
    Is there any specific reason for adding alias.
    I would suggest to keep name with physical format .
    Because, this will allow us to identify which file_number of ASM level related to which tablespace at database level.
    Like ,
    +DATA/test1/datafile/app_data.266.824722429
    file_number 266 of ASM of diskgroup DATA  is related to app_data tablespace of database test1.
    Regards,
    Aritra

  • How to use AppleScript with AccountEdge for printing?

    Hi all,
    Can AppleScript be used to print an AccountEdge invoice to a folder, quit this invoice, then increment the number of invoice to be opened by +1 and repeat the procedure with this invoice too? I am new to AppleScript and not familiar with its limitations.
    The version I'm using is AccountEdge Plus NE 2010. I also found this link to sample scriptswww.accountedge.com/updates/ but cannot unfortunately access it as I'm outside the US.
    I would be very grateful for your help. Thank you very much!

    When you run a script like that from Applescript the environment it runs in is not the same as when you run the command from the terminal. Specifically where the file is being written is not where you think.
    Try giving a full path to the output file say -0 ~/quotes11272013.txt to force the file into your home folder.
    Post back if you still have problems

  • Using AppleScript with saved Find/Replace Queries

    Hello all,
    I have been trying to create a script with AppleScript to apply a sequence of pre-saved queries created in the find/replace dialog in InDesign CS5 to all open documents.
    I am fairly new to AppleScript and I'm still learning, but this seems like a task it should be able to do? The queries are named 01, 02, 03 etc and I'd like to apply them in order to adjust the text formatting in all open documents.
    Is this the best way to approach the problem or do I need to reproduce the queries within the script?
    Many thanks in advance for any advice.

    Is this the best way to approach the problem or do I need to reproduce the queries within the script?
    Putting them in the script is much more robust. Have you looked at the sample script FindChangebyList?

  • Question about using Logic with guitar on stage. HELP!

    Hello,
    I'm a guitarist.
    I would need some advises about using Logic in a live situation..
    How do you move from one track to the other using the keyboard?
    Could that action be controlled by some kind of footswitch?
    Also, the REC button has to be always ON to hear the sound or is there another way to set that up?
    I would like to create let's say 6 tracks with plugins for having 6 different guitar sounds.
    Is it very heavy for the CPU?
    I'm using a macbook with 2GB of ram and a firewire FA-66 edirol sound card.
    Would you also recommend to use a preamp?
    Many many thanks for your help!
    Ciao
    Chester
    MacBook, Powerbook 17", iPod 4G, LaCie HD   Mac OS X (10.4.8)  

    Why to jump from one track to another?
    Simply create a folder with all the Channel strip settings and assign two key commands of your choice to navigate forward and backward.
    And yes, you can assign that command to a MIDI controller (or pedal) too.
    About monitoring have a look at the reference manual page 211.
    Before to buy a preamp try using the Hi-Z input from your Edirol.
    Anyway, six tracks with six plugins on each track are not an issue for your macbook.
    cheers
    rob
    Power Mac G4/533 PowerBook 12   Mac OS X (10.4.8)  

Maybe you are looking for