Solved

How to insert HTML in Word document

Posted on 2002-07-14
8
401 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
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.

617 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