• 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
Calling Word macro's/VB script in word
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling Word macro's/VB script in word


  • Subject: Calling Word macro's/VB script in word
  • From: "Kinsella, John R." <email@hidden>
  • Date: Thu, 19 Sep 2002 15:24:54 -0500

In order to facilitate the HTMLcode changes I'm making, I have to tell word
to show the active document in HTML Source mode. I found the easiest way to
do this was to record a macro, and then have the applescript call that by
the following method
Tell application "word"
Do visual basic "WordBasic.ViewTHMLSource"
End tell

Now, this works flawlessly for the first document that the folder action
scans. It changes the view, runs through the search and replace, and then
closes the document. It then opens the next document, and when it trys to
run that command, I get a
"Microsoft Word got an error: " WordBasic.ViewTHMLSource" doesn't understand
the do Visual Basic message."

So, it works once, and then fails with the next document. Any idea's as to
why?

John Kinsella
IRT-CS
University of St. Thomas
-------------
"The surest way to corrupt a youth is to teach him to hold in higher regard
those who think alike rather than those who think differently."
--Nietzsche
_______________________________________________
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.

  • Prev by Date: Re: Queuing a Eudora message...
  • Next by Date: Re: Mail UTF-7 Script -- final
  • Previous by thread: Re: simple applescript help needed
  • Next by thread: Re: Calling Word macro's/VB script in word
  • Index(es):
    • Date
    • Thread