Reason for not including images in .rtf

T

TriXteR

I am trying to display some HTML body in a richtextbox. Therefor I convert
the *.html file to *.rtf using the wordobject

------------------------------------------------------------------------------
'body html is a plain html file
'savertf is the path & file to save to

Dim savertf As String = sLocalpath & lbl_ourref.Text & ".rtf"
Dim objWord As New Word.Application
With objWord
.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone
.Documents.Open(Bodyhtml) 'savehtm)
.ActiveDocument.SaveAs(savertf, 6)
.ActiveDocument.Close()
.Quit()
end with
---------------------------------------------------------------------------------

I've noticed that when using Word(2003) to save .html as .rtf-file Word
sometimes includes the images in the .rtf-file, but other times it does not.
I've tested this with 'www.google.com' (images are included) and
'www.forkyou.nl' (images are not included)
The actions taken are identical in Word('Open File'--'Save File As (RTF)'

Does anyone know the reason why this difference occurs, or a way to always
include the images in the RTF??
 
T

TriXteR

I really would appreciate if anyone could help me with this, even if you
don't have the sollution could someone please confirm that this is in fact
true without any good reason for it?

Many thanks.
 
T

TriXteR

ok. I disected the HTML behind the google-page and found something completely
illogical....again.

The line that makes sure the images are included in the RTF is:
<INPUT type=hidden value=nl name=hl>

from the below code, without this line Word will not include the
image........why does this line effect the includeing of images in RTF? It
really seems to have nothing to do with the 'logo.gif' IMG...?!?!?!?!

<HTML><BODY><BR id=lgpd>
<IMG height=110 alt=Google src="logo.gif" width=285>
<TABLE cellSpacing=0 cellPadding=0>
<TBODY>
<TR vAlign=top>
<TD noWrap align=middle>
<INPUT type=hidden value=nl name=hl>
</TD></TR></TBODY></TABLE></BODY></HTML>
 
T

TriXteR

nice to see the overwelming responces.....

I've given it up, quit my job and am now a prostitute....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top