• 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
Microsoft Word X always crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Microsoft Word X always crashes


  • Subject: Microsoft Word X always crashes
  • From: Joe Szedula <email@hidden>
  • Date: Tue, 3 Jun 2003 17:51:24 -0500

Microsoft Word X (updated with: Office X 10.1.2 Update) always crashes
when I try to run an AppleScript to open a text file, and convert it to a
Word document with the desired formatting. The portion of my AppleScript
that runs Word is:

-- "theFile" is something like: myVol:myDir:myFile.doc
tell application "Microsoft Word"
do Visual Basic "Documents.Open FileName:=\"" & theFile & "\""
do Visual Basic " Selection.WholeStory"
do Visual Basic " With ActiveDocument.PageSetup
.LineNumbering.Active = False
.TopMargin = InchesToPoints(0.50)
.BottomMargin = InchesToPoints(0.50)
.LeftMargin = InchesToPoints(0.75)
.RightMargin = InchesToPoints(0.5)
.Gutter = InchesToPoints(0)
.HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.5)
.PageHeight = InchesToPoints(11)
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
End With"
do Visual Basic " Selection.Font.Size = 10"
do Visual Basic " Selection.Font.Name = \"Courier\""
do Visual Basic " ActiveDocument.SaveAs FileFormat:= _
wdFormatDocument, LockComments:=False, Password:=\"\",
AddToRecentFiles:= _
True, WritePassword:=\"\", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False"
close window theName
end tell
--
This used to work using Word 98 in Mac OS 8.6. Trying to run it using
Word X on Mac OS X 10.2.6 results in:

The application Word has unexpectedly quit.

I did change the first "do Visual Basic" line from "open file theFile"
because I was getting a "Can't get file" error message from my script.

Anyone know what's wrong? Is the problem with my combination of Mac OS X
and Word X?


Joe Szedula
Email: email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Microsoft Word X always crashes
      • From: David Wignall <email@hidden>
  • Prev by Date: Re: list question (was: list question)
  • Next by Date: Re: list question (was: list question)
  • Previous by thread: Re: Activate scripts at startup.
  • Next by thread: Re: Microsoft Word X always crashes
  • Index(es):
    • Date
    • Thread