• 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: Convert MS Word to HTML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert MS Word to HTML


  • Subject: Re: Convert MS Word to HTML
  • From: Mats-Olof Liljegren <email@hidden>
  • Date: Wed, 12 Nov 2003 16:36:11 +0100

On Nov 12, 2003, at 5:17 AM, Mats-Olof Liljegren wrote:

Problem:
Needs to make an applescript that takes a MS Word document from one directory, open it and save it as HTML in a different location. Don't now how to make this happen.

This is part of my code:
tell application "Finder"
launch
set this_file to open file (source_file as string) -- path to my word file
end tell
tell application "Microsoft Word"
activate
PROBLEM -> save the last document as ? in path_to_result
quit
end tell

Regards
Mats-Olof Liljegren
-------------------------------------------------------
Mats-Olof Liljegren
System Operator - Medieprogrammet


Mats,
you did not mention the OS, but here, word is recordable.
Open Script Editor and save the file as HTML in the directory you want.
Move to Script Editor and press stop. You have your code in there.

I'm trying to build a chain of actions to automate new articles on my website.
I would never ever use Word to do any HTML but my users use it (teachers and worse; principals) and they do not know anything about HTML.

This is my scenario:
A teacher or principal places a word (or excel) file in a folder with a folder action. Then the folder action takes over and moves the original to The_orignal_folder. Open the original saves it as HTML in The_HTML_folder.
BBEdit grabs the file and clean it up using regexp.
The clean content goes into the webservers MySQL-database.
A copy the original files will be place on my webserver and on the newly created post in MySQL there will be a link to the original file.

That is what I want to achieve.

All I want from the original file is the text and it's formatting, eg <b>Bold</b> no dirty MS Word code!

If anyone could point out another way to do that without using Word it would be great ( the originals will be in Word, not much to do about that.)

/Mats-Olof

Caveat, files in word saved as HTML have a miserable code to change. But is all done for you.
Clean the recorded code, ask if you need help and you should be all set.




Regards

Deivy
http://www.dicas.com/
_______________________________________________
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.

References: 
 >Convert MS Word to HTML (From: Mats-Olof Liljegren <email@hidden>)

  • Prev by Date: Re: Mail email to Filemaker
  • Next by Date: Missing system attribute "LANG"
  • Previous by thread: Convert MS Word to HTML
  • Next by thread: Re: Convert MS Word to HTML
  • Index(es):
    • Date
    • Thread