Solved

How to insert HTML in Word document

Posted on 2002-07-14
8
400 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
Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

 
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
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 make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

752 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