Solved

How to insert HTML in Word document

Posted on 2002-07-14
8
394 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction It seems that at least a couple of times per month, I answer a question that requires automating Outlook from another Microsoft Office application, usually (although not always) to send one or more email messages.  For example: …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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 …

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now