• 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
Re: Saving as HTML in Word 2001
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving as HTML in Word 2001


  • Subject: Re: Saving as HTML in Word 2001
  • From: g3pb <email@hidden>
  • Date: Mon, 02 Apr 2001 16:54:53 -0800

-- try this

on open fileList
with timeout of 300 seconds
tell application "Microsoft Word"
repeat with dataFile in (fileList as list)
set fullPath to (dataFile as text)
set htmlName to fullPath & ".html"
open file fullPath

do Visual Basic " ActiveDocument.SaveAs FileName:=\"" &
htmlName & "\", FileFormat:=wdFormatHTML, _
LockComments:=False, Password:=\"\", AddToRecentFiles:=True,
WritePassword _
:=\"\", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False, HTMLDisplayOnlyOutput:=False"

close document 1 saving no
end repeat
end tell
end timeout
end open


-- hcir
mailto:email@hidden
Made with a Mac!


> I have a handy little script that I rely heavily on--it batch converts
> Microsoft Word documents to HTML, using the "save as HTML" option in Word.
> It has worked great for me in Office 98, but since I upgraded to Office
> 2001, it doesn't work any more. This is the script:
>
>
> on open fileList
> with timeout of 300 seconds
> tell application "Microsoft Word"
> repeat with dataFile in (fileList as list)
> set fullPath to (dataFile as text)
> open file fullPath
> set theName to name of window 1
> if (count of theName) > 25 then
> set fullPath to (text 1 thru (24 - (count of theName))
> of fullPath) & "=8A"
> end if
> save document 1 in file (fullPath & ".html") as "Web Page"
> close document 1 saving no
> end repeat
> end tell
> end timeout
> end open
>
>
> It may not be exactly as it was when it worked in Word 98--I've been
> fiddling with line 9 in an attempt to get it to work.
>
> If anyone can offer a suggestion, I would really appreciate it.


  • Follow-Ups:
    • Re: Saving as HTML in Word 2001
      • From: Zachary Mutrux <email@hidden>
References: 
 >Saving as HTML in Word 2001 (From: Zachary Mutrux <email@hidden>)

  • Prev by Date: Re: rebuilding desktop
  • Next by Date: Re: CGIs with OSX
  • Previous by thread: Saving as HTML in Word 2001
  • Next by thread: Re: Saving as HTML in Word 2001
  • Index(es):
    • Date
    • Thread