Re: Microsoft Word Create New Document
Re: Microsoft Word Create New Document
- Subject: Re: Microsoft Word Create New Document
- From: Christopher Stone <email@hidden>
- Date: Wed, 07 Dec 2016 17:51:37 -0600
Hey Gil,
This works for me with Word 14.6.7 (Office 2011):
------------------------------------------------------------------------------------------- # Remember to add “as text” here – otherwise you get a list of an alias and a text item. set targetFilePath to (path to desktop as text) & "TestFileName.doc"
tell application "Microsoft Word" make new document tell active document to save as file name targetFilePath file format format document set ReportDoc to document (get name of active document) tell ReportDoc insert text "Example report text" & return at end of its text object save close end tell end tell -------------------------------------------------------------------------------------------
|
_______________________________________________
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