Change value of option button (OLE object) in Microsoft Word file

Hi guys,
I would like to convert a macro from VBA to AppleScript. Unfortunately, I'm the beginner of AppleScript and I don't know how to change value of an option button in Microsoft Word.
For example, I have an option button with 2 options (group name = question413) Yes and No. Now, I would like to open Word file, then change value of option button with group name "question413" to Yes. Below is my code in VBA.
SetOptionButton "question413", "Yes"
Public Sub SetOptionButton(GroupName As String, Value As String)
Dim oShape As Word.InlineShape
For Each oShape In ActiveDocument.InlineShapes
If oShape.OLEFormat.ProgID = "Forms.OptionButton.1" Then
If oShape.OLEFormat.Object.GroupName = GroupName Then
If oShape.OLEFormat.Object.Caption = Trim(Value) Then
oShape.OLEFormat.Object.Value = True
Else
oShape.OLEFormat.Object.Value = False
End If
End If
End If
Next
End Sub
How could I convert them to AppleScript?Any comments would be highly appreciated.
Thanks,

Hi
Theirs a pretty in depth tutorial over at MACTECH, which I think will aid your in your code transition
Moving from Microsoft Office VBA to AppleScript:
MacTech's Guide to Making the Transition
http://www.mactech.com/vba-transition-guide/index.html
Budgie
Message was edited by: Budgie
Their is also the possibility you could use the "do Visual Basic" command, not to sure about thta though

Similar Messages

  • Please create "on-the-fly change search engine" option ALSO for when we mark [word] in a text, then right-click, then choose "Search [engine x] for [word]"?

    In Firefox 34, you have changed the search bar.
    The new style is perfect for those who always starts by typing in, letter for letter, the search term.
    People such as myself, we almost never type in the search term,
    but instead we mark a [word] in a text, right-click this marked [word], then select "Search [engine x] for [word]".
    Speaking for myself, I have now a total of 36 search engine providers, but I usually only use 7 of those.
    I use "Wikipedia (English)" most of the time..
    - but then I will switch to e.g. "AniDB" and use that one for 1 hour..
    - or switch to "Google" and use that one for 30 minutes..
    - or switch to "Wikipedia (Norwegian)" and use that one for 2 hours..
    - or switch to "Wiktionary (English)" and use that one for 15 minutes..
    ..and then I will switch back to "Wikipedia (English)" again.
    The way the search bar was in Firefox 33 and earlier, I could very easily switch the default search engine.
    Just one click to open the drop-down menu, then choose one.
    In Firefox 34, I have to choose "Tools" -> "Options", the "Search" tab..
    - before I can THEN click to open the drop-down menu.
    4 clicks instead of 1, that's like 400% more work..!
    Also, the fact that I have to go into "Options".. make this..
    ..I don't know how to put it, it's a kind of psychological barrier that I have to overcome each time.
    I mean, before Firefox 34, I went to the "Options" window like maybe 4 times each YEAR,
    now, I have to go there 4 times each DAY..!
    I am not saying you should revert to the old style Search bar,
    as I feel that those you are typing search terms are indeed very happy for this new style..
    Instead, I think of 2 possible ways to create happiness also for us that do mark text and choose "Search.."
    1) An "on-the-fly change search engine" option ALSO for when we mark [word] in a text, then right-click, then choose "Search [engine x] for [word]".
    This could work as a cascading menu option, where it says..
    Search for [word] in -> [engine x]
    ..and where [engine x] was the current default engine, and all the other engines was listed underneath,
    just like the drop-down menu when you switch the default engine.
    Additionally, you could have an on / off checkbox in the "Options" "Search" tab, where you had this option:
    "Change default search engine when choosing another from the drop-down menu"
    THIS would actually be PERFECT.. It would be even much BETTER than in Firefox 33 and earlier..! :-)
    2) If there are things with the first option that don't work (something I've missed etc),
    then maybe you could have an on / off checkbox in the "Options" "Search" tab, where you had this option:
    "Use old-style search bar"
    This would be off by default, but when switched on, it would give us the old Firefox 33 style Search bar.

    Strongly recommend Context Search extension which will solve your problem
    - https://addons.mozilla.org/en-US/firefox/addon/context-search/?src=search

  • Why Acrobat x professional is changing the text formatting specifically the font family  and the font size of the text in my pdf on exporting it to Microsoft word file format ?How should i stop Acrobat x professional from doing that so that i get an exact

    Why Acrobat x professional is changing the text formatting specifically the font family  and the font size of the text in my pdf on exporting it to Microsoft word file format ?How should i stop Acrobat x professional from doing that so that i get an exactly same word file on exporting it from its pdf counterpart?

    I was testing the preciseness & efficiency of Adobe acrobat x professional's doc conversion capabilities. As i have to take a document editing project in future which is going to need lot of pdf to word and vice versa conversions . What I did was I created a test word document converted into a pdf using a pdf maker in my word 2007 , Acrobat did convert the document from word to pdf keeping everything in the source file intact , However when i tried the other way round and attempted to convert the same pdf to word 2007 file format I lost my formatting ?So the font that I used to create the pdf are the ones taken from word 2007 which i believe is using the fonts that are installed in my computer. Any suggestions on how to preserve the formatting of the document after converting it from pdf to word file format?
    Regards
    Mike

  • Certain web forms have formatting options like those found in Microsoft Word. They don't appear when I use Firefox, but do with IE of course. Is there a way to get it to display?

    Certain web forms have formatting options like those found in Microsoft Word. They don't appear when I use Firefox, but do with IE of course. Is there a way to get it to display?

    That formatting feature for text areas is known as Rich Text editing. Easy to enable on the web page with one line of code to tap into the Midas package that Mozilla uses, but the users can't enable it themselves from within Firefox.
    http://kb.mozillazine.org/Rich_text_editing
    http://kb.mozillazine.org/Midas
    http://www.mozilla.org/editor/midas-spec.html

  • Ole object missing on pdf file

    i have long raw field in database. i am saving excel workbook in it through ole container. it displays well on report but when i generate pdf from report it miss ole field and show that portion of report blank. It exports ole object in postscript format (.eps) but i dont now any software which can open this file and show result on screen.
    i am using developer 6i with oracle 9i database in client-server environment.
    thanks

    Hello,
    Take a look to the thread :
    Re: Image in Reports
    eps files are "Encapsulated PostScript", for more details :
    http://www.tailrecursive.org/postscript/eps.html
    for example
    Regards

  • Memory problem if OLE-object references to WMF files

    Hi there,
    I have a report with an OLE object containing WMFs.
    The graphic files are variable and their name is loaded from the database during runtime (path + filename).
    Running the report leads to 185 pages, each one containing a different WMF.
    If I preview the report in CR, everything looks fine.
    If I print the report, the OLE object / graphic is left empty....
    If I export the report to PDF (as an example) I get the error message 'memory full'. Reducing the data set to ~50, the PDF is created. But the pictures get resized (much bigger) and only parts are visible.
    The machine I'm using doesn't have any memory problems.
    The WM files are only 3 to 12 KB each.
    If I convert the WMFs to JPG and use these within the report it works...
    Problem with this: a loss of quality (it is necessary to stretch the pictures to certain size)
    Thanks in advance for any ideas!
    Susanne
    I'm using CR 2008 SP 3 on Windows 2003 Server

    Format the pictures outside of CR for best results.

  • OLE object using MS Word -- Unprotect/Protect document

    Hi.
    I'm on ECC6.0. I need a functionality to open a Word file (.rtf / .doc) on user's temp folder, unprotect it (like using Word's Tools -> Unprotect Document because, by default, the doc is protected w/o a password) to be able to protect it with a password, and then save it. I tried the following code but it's not working as I expected for the requirement:
    TYPE-POOLS: ole2.
    DATA:
    lo_word TYPE ole2_object,
    lo_worddocs TYPE ole2_object,
    lo_worddoc TYPE ole2_object.
            CREATE OBJECT lo_word 'WORD.Application'.
            GET PROPERTY OF lo_word 'Documents' = lo_worddocs.
            CALL METHOD OF lo_worddocs 'OPEN'
              EXPORTING
              #1 = lv_file_source.
            GET PROPERTY OF lo_word 'ActiveDocument' = lo_worddoc.
            CALL METHOD OF lo_worddoc 'UNPROTECT'.
            CALL METHOD OF lo_worddoc 'PROTECT'
              EXPORTING #1 = 'password'.
            CALL METHOD OF lo_worddocs 'SAVE'.
            CALL METHOD OF lo_worddocs 'CLOSE'.
    In tcode SOLE, I found two relevant entries:
    OLE application      WORD.BASIC
    Version number       6
    CLSID                {000209FE-0000-0000-C000-000000000046}
    CLSID LibType        {000209FE-0000-0000-C000-000000000046}
    OLE object name      WORDBASIC
    Type Info key        NO_TYPELIB
    Include program
    Language             EN
    Check authorization
    Text Microsoft Word 6.0 Wordbasic
    OLE application      WORD97
    Version number
    CLSID                {000209FF-0000-0000-C000-000000000046}
    CLSID LibType
    OLE object name
    Type Info key        NO_TYPELIB
    Include program
    Language
    Check authorization
    Text
    Pls help me to the right track.
    Thanks.

    Post Author: fwinter
    CA Forum: .NET
    We have the same problem. A page footer generated in Word, embedded in a CR-Report shows in the report viewer with overlapping characters. This is "a known limitation" we were told. Not really a problem, but when exported to PDF, the PDF also shows the overlapping characters and prints with overlapping characters as well. This is our problem!We've tried different fonts, different font- an pagesizes in Word, the "can grow" checkbox etc. We believe, the result is affected by the printer driver but cannot really find a way, to avoid the problem and get a clear print at all of our customers.Anyone figured out how to solve the problem? CA Support unfortunatly couldn't help   We are using CR Merge Moduls XI R2 in our Report Viewer, Word 2003, Problem appears on local machines as well as on Citrix.

  • Dynamic OLE object not displaying proper file

    We are using CR IX R2. I have a report that I would like to attach a pdf to. This pdf will be different depending on the selection of data from the rest of the report. The file location is always the same but again the name of the file will vary.
    The location and name of the file are listed in one field of a table. Is there a way to do this. When I edit the OLE object and select the field where  the file resides it only shows the original document that I choose.
    At this point I am testing it in a blank report before I create the subreport to add it to our existing report.
    Any suggestions?

    What happens if you try this link:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0fbebaf-07e0-2c10-ad9a-d45810ae7109&overridelayout=true
    It should open the PDF Browser viewer. If it doesn't then you likely need to add PDF support to your browser. Or configure PDF or install the latest version. Could be a permission issue also.
    Thank you
    Don

  • Linked Ole Object with MS Word has bad resloution / invalid fonts

    Post Author: Winfried Boennhoff
    CA Forum: .NET
    Environment: .Net 2003 Viewer with external .rpt created by CR XI
    As result I get a bad resolution of the word document and the original fonts are not supported, I tried all common fonts. The font used by CR seems to be default font with a very bad resolution.
    The same effects not only with MS word, although with an linked PDF or any image. All have a very bad resolution.
    Is this a known Problem? Any Idea?

    Post Author: fwinter
    CA Forum: .NET
    We have the same problem. A page footer generated in Word, embedded in a CR-Report shows in the report viewer with overlapping characters. This is "a known limitation" we were told. Not really a problem, but when exported to PDF, the PDF also shows the overlapping characters and prints with overlapping characters as well. This is our problem!We've tried different fonts, different font- an pagesizes in Word, the "can grow" checkbox etc. We believe, the result is affected by the printer driver but cannot really find a way, to avoid the problem and get a clear print at all of our customers.Anyone figured out how to solve the problem? CA Support unfortunatly couldn't help   We are using CR Merge Moduls XI R2 in our Report Viewer, Word 2003, Problem appears on local machines as well as on Citrix.

  • Using Access to store OLE objects like Excel , Word docs and retrieve them

    Hi folks,
    I need a solution for this problem guys.
    The logic is like this : A portable exe file and a database. Database contains files stored ( embedded ) in it like Excel , Word , notepad etc.
    On running the exe file and giving necessary prompts or combo entries, it should display all files related to the selection and On clicking the link the document should open itself.
    Why I use Access : Most of the PC contains MS Office. Otherwise I have to use a lightweight protable database.
    Also it should be able to store files into it. As far as I know , Access can store excel and images etc. Is there any other protable db capable of storing excel and word docs.
    After storing how do I retrieve the file. I have read about displaying images. What about excel files...

    Portable as in the sense every one can cary the file and the MS access database and can access data whenever they want . They can carry it in their flash drive / USB drive. Only the data base would get updated with the data. So in effect , One could access the updated documents by the means of a query.
    This should work in Windows environment

  • How do you change a microsoft word file back from pdf file?

    I had a document I created and switched to pdf file. How do I change it back?

    Not possible with Adobe Reader. You'll need either Adobe Acrobat or a subscription to PDF Pack to do it.

  • Cannot insert a PDF as an object in Microsoft Word

    Hello:
    I am using Adobe Acrobat Pro 9.0.
    When I tried to insert a PDF into a Word document, I get the following error message:
    I am able to create a PDF.
    What am I doing wrong and how do I resolve this issue?
    Venki

    I am having this same issue.  Has it been solved yet?

  • Report with OLE Object Problem (Crystal Report 11)

    Post Author: ibertola
    CA Forum: General
    Hi all,I'm a new user, and I've got a problem with OLE object. I would like to have a report that show me ONLY one of many OLE (word document) in Crystal structure.I've created 3 section detail, and in each one I've insert OLE object (creating from a file, and LINK).So, if I change one document stored locally, and then refresh the report, the content doesn't change like the linked file! Actually I've got all locally  Please help me.

    CR XI r2 is not supported on WIN 2008. See the [supported platforms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7081b21c-911e-2b10-678e-fe062159b453]
    documentation  and [this|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=56787567] wiki.
    Ludek

  • Crystal report AS ole object into word

    I've been searching the web on using crystal reports as an OLE object inside a word document, but all results have been about using a word document inside a crystal report.
    I am trying to create a quarterly report document for a  business. This document is built using MS word. The document needs to include various tables, charts and the like, which they want to build in crystal reports so that they can be used either as part of the quarterly or as standalone reports.
    I would like to embed these reports into MS Word. Ideally, every three months the reports would be updated with new parameters, the word document would be opened, and the linked OLE reports would display the updated data tables and charts.
    I'm not sure if this is possible. I just attempted to embed a crystal report inside a word 2007 document, but the OLE object only showed up as an object containing the report filename, not the actual report.
    Can crystal act as an ole server for a word document to do what I want it to do, or will I need to programatically export the batch of crystal reports to images in order to have them show up in the word document?

    if you have business objects enterprise & live office, you can use Business Objects Live Office to embed the following from crystal reports into word or excel or powerpoint:
    1) charts
    2) cross tabs
    3) summaries
    4) fields
    to name a few.
    you can also use prompts in the word doc to allow you to change up the above on the fly.

  • Vibe UI - Options Button and Recent Apps

    Is there a way to change the physical "Option Button" to "Recent Apps" button? If not could you put such options in the settings.
    I also wonder if you could  not change the recent apps menu a bit. The most recent apps apear at the bottom part of the screen rather than on the entire screen, which makes switching between apps a bit more tedious.

    pat_box,
    Which phone are you talking about ? A colleague of mine who owns Vibe Z2 told me that have to hold down the Option Button for a few seconds to see the recently used apps. Give it a try.
    Cleo
    WW Social Media
    T61, T410, x240, Z500, Flex 14
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    How to send a private message? --> Check out this article.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

Maybe you are looking for