#1
|
|||
|
|||
Convert word files to html including hyperlink file types
I’m creating a documentation set which will consist of a number of Word 2007 files linked together with multiple hyperlinks. I’m planning to hyperlink to bookmarks so that each link can go to a precise location in the target document.
I want to use Word's standard file format, partly because I’m used to it and can create content quickly, and partly to have a paginated version for possible printing. But the files will need to be converted to html for use. My difficulty is with the hyperlinks. After conversion (using Word ‘save as’) they no longer work, not surprisingly, as conversion leaves the href file names as “.docx” instead of “.htm”. Is there a way to make amending the hyperlink file extension part of the conversion process? I’d like to avoid a manual edit afterwards, as there would be a lot of links to update, and it’s a chance for errors to creep in. Many thanks. |
#2
|
||||
|
||||
Hi Miks,
After the conversion, any hyperlinks are probably going to need more than just the file extension changed - the final HTML paths are liable to be quite different too. Consequently, you'll probably need to open the HTML files as text files and use, say, Find/Replace to change all the URLs. The alternative is to merge the files before converting them to HTML and making all the links internal.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks, not sure what you mean about paths though...
Paul, many thanks for that - the main thing is to know what needs to be done.
But one thing I don't understand: can you tell me why the url paths would need changing - is that only for hyperlinks used to get into the document set from outside, or for all of them? There will only be one, or at most a few, url entry points to the document set, so I was hoping to avoid changing paths for the rest by using relative hyperlinks. All files will be held in the same server directory, so once a reader has got into the document set, I thought that links clicked on later wouldn't need to include a path, just the filename? |
#4
|
||||
|
||||
Hi Miks,
The existing URLs will presumably contain filepaths that point to the existing documents, in whatever folders they're located in. IIRC, Word stores the absolute paths for the hyperlinks, even if you omit them from the hyperlinks dialogue. In that case, when you convert the files to HTML, the hyperlinks will be converted to their absolute form and will continue to point to the existing folders. Thus, even if you change just the file extensions in the URLs, they'll still point to the (now) HTML files in their present locations. So, if someone clicks on one of your hyperlinks, IE or whatever they're using will try to open the file that's in your current folder - not whatever other folder you might actually now have the HTML files in.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
conversion, html, hyperlink |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to convert HTML to Word doc | trtrtre | Word | 1 | 12-27-2011 07:26 PM |
Can't save Large Word files to html | Gardener | Word | 0 | 12-25-2011 09:37 AM |
convert html to text at opening | etfjr | Word | 0 | 12-13-2010 11:14 AM |
Convert a file from HTML to WORD format weblayout view | gtselvam | Word | 0 | 12-02-2008 03:53 AM |