• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Table in Word 2012
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Table in Word 2012


  • Subject: Re: Table in Word 2012
  • From: Barry Wainwright <email@hidden>
  • Date: Wed, 14 Nov 2012 22:13:54 +0000

Unfortunately the 'separator' option in convert to table is broken.

This ugly hack works though:

tell application "Microsoft Word"
set txt to selection's text object
set default table separator to tab
set theResult to convert to table txt
end tell

-- 
Barry

On 14 Nov 2012, at 11:11, Jeremy Roussak <email@hidden> wrote:

Hi,

I think this should be simple, but I'm falling at the first hurdle. 

I want a script to convert Word's current selection, which is a series of lines of text with cells delimited by tabs, into a table; I'll then apply some formatting. I've tried

tell application "Microsoft Word"
set txt to selection's text object
convert to table txt
end tell

which works, but ignores the tabs (I get a table with only one column). If I try

tell application "Microsoft Word"
set txt to selection's text object
convert to table txt separator separate by tabs
end tell

which I think should work, I get an error: "text object of selection doesn't understand the convert to table message". 

Any ideas?

Jeremy



Jeremy Roussak
email@hidden
Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
  • Follow-Ups:
    • Re: Table in Word 2012
      • From: Paul Berkowitz <email@hidden>
    • Re: Table in Word 2012
      • From: Jeremy Roussak <email@hidden>
References: 
 >Table in Word 2012 (From: Jeremy Roussak <email@hidden>)

  • Prev by Date: Re: Modifying your Keychain Certificates with an AppleScript
  • Next by Date: Re: Modifying your Keychain Certificates with an AppleScript
  • Previous by thread: Table in Word 2012
  • Next by thread: Re: Table in Word 2012
  • Index(es):
    • Date
    • Thread