MACSCRPT Archives

July 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bill Steele <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 10 Jul 2007 14:07:37 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
I have a script that opens a Word template and saves a new document, 
using the recorded Microsoft VB gobbledegook, like so:

	set filepath to "Server:Edit:test"
	tell application "Microsoft Word"
		activate
		do Visual Basic "Documents.Add 
Template:=\"Server:Edit:Template\""
		do Visual Basic "	ChangeFileOpenDirectory 
\"Server:Edit:\""
		do Visual Basic "	ActiveDocument.SaveAs 
FileName:=\"" & filePath & "\", FileFormat:=wdFormatDocument"
	end tell

Worked fine until just the other day, now all of a sudden it gives 
"Ambiguous filename detected : tmpDDE" and highlights the first line 
above that its suppose to open the template.

I tried recording the same steps again, got some slightly more 
elaborate gobbledegook, and when I ran that I got the same error.

The Template file was lost and replaced, so that may have something 
to do with it, but AFAIK it's the same Word template file.
-- 

Bill Steele
[log in to unmask]

ATOM RSS1 RSS2