Solved

How to insert HTML in Word document

Posted on 2002-07-14
8
395 Views
Last Modified: 2008-02-26
I have an HTML document which I have created in Word 2000.  I would like to add
<img src=http://myserver.com/photo.jpg> to the resultant file/web page but can't find a way to do it without the text appearing literally - i.e. it is not interpreted causing the actual photo to appear.    I could view the file with IE then view source, add my tag and save, but that's not excactly eloquent.
Thanks
Eugene
0
Comment
Question by:EugeneGardner
  • 3
  • 3
  • 2
8 Comments
 
LVL 4

Expert Comment

by:Monchanger
ID: 7153389
To insert a link to an image you can use the normal "Insert Picture" command (Menu: Insert->Picture->From File). Then select your image and instead of hitting "Insert", click the down-arrow next to it and select "Link to File".

(For other hyperlinks, use the "Insert->Hyperlink" (Ctrl+K) command)

The problem with Word is that it will search for the file and it doesn't give up. If you don't have the file itself (only know it by name) I couldn't figure out a way to edit it in Word.
0
 
LVL 1

Author Comment

by:EugeneGardner
ID: 7154608
But the file is not on my PC - it is on the Web.  I can not browse to it from "insert picture".   I can easily add a picture from my PC, but when the web page is moved to a server so that others can see it, they will not find a picture at C:\mydirectoryname

Eugene.
0
 
LVL 4

Expert Comment

by:Monchanger
ID: 7155247
True and true.
But Word does use a relative path to the image. Not "C:\mydirectory\Picture.jpg", but "Picture.jpg", "images/Picture.jpg" or "../Common/Images/CompanyName.jpg". (Remember to use "/" and not "\")

This is output I got from my test:
<img width=381 height=500 id="_x0000_i1028"
src="Images\Time-YodaStrikesBack.jpg"></p>

What you'd have to do in any web authoring software is to have the images on your local computer. When you build your web page, you use relative paths to files.
In Word you link to these files. And upload everything in the same directory structure, so that the relative links work.

Hope this helps,
Monchanger
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 4

Accepted Solution

by:
EricWestbo earned 100 total points
ID: 7155602
Eugene...

If the image is on a webpage, you can right click on it, select properties & copy the url for the image into your clipboard.

Then, in Word, insert>picture>from_file & paste the url in the File Name box.  This will copy the image from the web directly to your doc.

Hope this helps!

/ew
0
 
LVL 1

Author Comment

by:EugeneGardner
ID: 7155923
Monchanger, I followed your instructions and Word does indeed put a relative file location in the HTML.  For me, the problem with that is that the address of the photo is not on the same file structure as the web page, so in my situation it would not do what I need.  Thanks for taking the time though.
 
EricWestbo,  How obvious !   How could I not get that with all the experimenting I did ?  I looked through the online help too and still didn't find it.  Thanks, I propose to accept your comment as answer in a day or two.

Eugene.
0
 
LVL 4

Expert Comment

by:Monchanger
ID: 7156319
Oops, I actually had that problem in mind and neglected to explicitly write "download the file to your computer".

Anyway, I wouldn't use the method of referencing another server unless it actually belongs to me. Even then, if it goes down, your site will be missing those images.

Nice catch Eric :-)
0
 
LVL 4

Expert Comment

by:EricWestbo
ID: 7156890
Danke.

/ew
0
 
LVL 1

Author Comment

by:EugeneGardner
ID: 7158487
I needed to reference another server as I am selling stuff on one site and referencing photos on another as I would have to pay several cents to keep my photos on the auction site !
Thanks.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Perhaps more familiar to developers who primarily use VBScript than to developers who tend to work only with Microsoft Office and Visual Basic for Applications (VBA), the Dictionary is a powerful and versatile class, and is useful …
Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question