Help and Support

WD6X: AppleScript Get Command Incorrectly Returns Hyphen

Article ID:126371
Last Review:December 14, 1999
Revision:1.0
This article was previously published under Q126371

SYMPTOMS

When you use the AppleScript Get command to get hyphenated words from a Word document, the hyphen symbol (-) is returned as a valid word.

CAUSE

The Get command is used to retrieve objects from a Word document. The command then builds a list of those objects. For instance, when used on a document containing the words "As Time Goes By," the AppleScript code "get every word of paragraph 1" will return the list "As", "Time", "Goes", "By."

When you use the Get command to retrieve words that are separated by hyphens, the hyphen symbol is included in the list of returned items just as if it were a valid word. For example, the AppleScript code "get every word of paragraph 1" will return the list "As", "-", "Time", "-", "Goes", "-", "By" when used on a document containing the text "As-Time-Goes-By".

Microsoft Word does not have a simple method for jumping to the end of a hyphenated word; therefore, the Apple Event code does not have a simple way of returning an entire hyphenated word.

APPLIES TO
Microsoft Word 6.0 for Macintosh

Back to the top

Keywords: 
kb3rdparty kbprb KB126371

Article Translations

 

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.