PDA

View Full Version : Including a Word Document into a Dreamweaver Template


Electrodesign
03-13-2007, 07:42 PM
Hi Guys,
I'll apologise in advance if i've posted this in the wrong section.
I need to include a Word document into a template so that when my site is uploaded I can edit the Word document remotely, thus saving time later on.
My question is, to keep the formatting of the original Word document, should i save it as .doc, .rtf or .txt?
When saving as .doc, it doesn't include as required and saving as .rtf or.txt, i lose the formatting altogether.
Is there an easy fix to this.
ps the document will be included into a table controlled by CSS so the only concern is for the paragraphs etc.
Hope this makes sense and thanks in anticipation

kate
03-13-2007, 09:14 PM
Import as a HTML document,

Make sure your cursor is in design view go to file>menu>import > word >browse click open>

Done
:mrgreen:

Electrodesign
03-14-2007, 08:35 PM
Thanks Kate.
I'm afraid it's not quite what I'm after. I'm ok with what you've posted but after importing the file it embeds the text into the actual document.
What i really need is a way of including a link to the word doc so that the word doc can be updated without the need to rewrite the text on the actual web page. Is this done somehow by using a PHP include or SSI?
If it's a php include can someone supply the link code that I need?
It's not life threatening if I cant do it this way, but it would make life a whole lot easier as I get updates to my site via a third party in the form of a word doc and it would be great to just upload this file and not have to mess with the Site proper.

kate
03-14-2007, 08:40 PM
Hi,

Its sounds more complicated than I anticipated, sorry.

I can ask at my newsgroup so just bear with me, or rather the answer back. On the goup we have some DW gurus who may know.

:mrgreen:

lux
03-14-2007, 09:20 PM
this tutorial should help: http://www.tizag.com/phpT/files.php

work your way through that and ask if you've got any questions

regards

kate
03-15-2007, 07:47 AM
Hi,

This is back from a group member this morning,:

Hi Kate, I'm not sure what you need exactly: Is the link simply a link to a
Word doc? In that case, don't edit the link, simply upload the new edited
Word doc with the same name.

If they're creating Word HTML and then putting it on the web as an HTML
page, then simply post the HTML page edited.

Now, you can't post a Word doc and simply have it come into an HTML page as
far as I know. You can save that Word doc out as HTML and post it though and
then link to it using includes which would be:

SSI or ASP: <!--#include virtual="/path_relative_to_site" -->
or
<!--#include file="/path_relative_to_site" -->

PHP: <?php include("../path_relative_to_document") ?>


Let me know if its what you want, or give me more imfo please.

:mrgreen:

Electrodesign
03-15-2007, 08:33 PM
Thanks Kate,
Your help is much appreciated.
It works now and here's how I did it for anyone else who needs it.
Save the Word doc as a HTML (Web) document in Word.
Save the template that you are using it in as a .php extension.
Insert the following line of code in a table where it is to be displayed
<?php include("../path_relative_to_document") ?>
Upload both files and any other image/CSS files into your directory and voila! the text you require appears. It's then just a case of editing the content of the word doc (HTML) and uploading that.
Thanks very much for your help in this matter.
I'm off for a celebration beer now and i'll be raising my first glass to you!
Thanks to the other members who took the time to read/post
Love
Hubert

kate
03-15-2007, 08:45 PM
:mrgreen: :mrgreen:

Wonderful!

Thanks are not due to me but to a friend Ann from the newsgroup I have. Great to see its sorted. About the beer, make mine a Vodka and orange..hahaahahahhahaaha!

:lol: