Mac Help Forums


Reply
Thread Tools Display Modes

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

 
New Member
Join Date: Oct 2008
Posts: 2
 
      1st October 2008
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,
 
Reply With Quote
 
 
 
 
New Member
Join Date: Oct 2008
Posts: 2
 
      2nd October 2008
Help me, please.
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change default order for loading object in a nib file abirtz@gmail.com Programmer Help 1 1st June 2009 05:12 PM
Microsoft Word for mac.........change fonts???? J. Fred Bear New to Macs? 0 3rd December 2008 11:00 PM
NSArchiver, change object-graph in vivo ? Florian Zschocke Programmer Help 1 4th April 2005 09:28 PM
selected word from Microsoft word using applescript dileep Programmer Help 1 26th October 2003 11:02 AM
selected word from Microsoft word using applescript dileep Programmer Misc 0 22nd October 2003 12:58 PM


All times are GMT +1. The time now is 04:35 AM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
Yikes! Teacher needs help!
Mollyc4627 (7 Hours Ago, 08:57 PM)

Unable to log in to websites
AMonty20 (10 Hours Ago, 05:52 PM)

Add Different Speech Commands
bae_22 (11 Hours Ago, 04:40 PM)

Login (2 macs) passwords spontaniously changed?
Roger Vaught (13 Hours Ago, 03:31 PM)

Best car charger or inverter for Macbook Pro?
imeme87 (13 Hours Ago, 03:22 PM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51