Groups > dBase > Getting Started with dBase > Re: Passing a image and a text to MSWord: a reply




Passing a image and a text to MSWord: a reply

Passing a image and a text to MSWord: a reply
Mon, 17 Mar 2008 09:13:15 -050
You can achieve passing text and image to ms word with the follwing:

1. create an html file on the fly
f = new file()
f.create("somefilename.htm","RW")

2. store your text and image structure into a memory variable, below is an
example structure
local mtext
mtext = "<html>"
mtext+="<body>"
mtext+="<p>this is my text"
mtext+="<IMG SRC='./images/go.bmp'>"
mtext+="</body>"
mtext+="</html>"

3.store stored text in html file
f.puts(mtext)
f.close()

4.open file in ms word
oWord = new oleAutoclient("word.application")
oWord.visible=true
//note that the complete path to your file must be specified
oWord.documents.open(set("directory")+"\somefilename.htm")
oWord.selection.endkey(6)


Post Reply
Re: Passing a image and a text to MSWord: a reply
Mon, 17 Mar 2008 20:55:25 +010
Agbeniga David:

I almost lost this message.....
I do not have any idea why it get here.

Very good
It does what I asked for.
Thanks a lot
Is there a way to indicate where I want the image
for example centered... it comes at the left border.

Thanks

Emilio




"Agbeniga David" <agbenigadavid@yahoo.com> escribió en el
mensaje 
news:S79ALkDiIHA.632@news-server...
> You can achieve passing text and image to ms word with the follwing:
>
> 1. create an html file on the fly
> f = new file()
> f.create("somefilename.htm","RW")
>
> 2. store your text and image structure into a memory variable, below is an

> example structure
> local mtext
> mtext = "<html>"
> mtext+="<body>"
> mtext+="<p>this is my text"
> mtext+="<IMG SRC='./images/go.bmp'>"
> mtext+="</body>"
> mtext+="</html>"
>
> 3.store stored text in html file
> f.puts(mtext)
> f.close()
>
> 4.open file in ms word
> oWord = new oleAutoclient("word.application")
> oWord.visible=true
> //note that the complete path to your file must be specified
>
oWord.documents.open(set("directory")+"\somefilename.htm")
> oWord.selection.endkey(6)
>
>
> what is wrong with dbase newsgroup reply button not showing and keeps 
> sending my messages to the getting started news group 

Post Reply
Re: Passing a image and a text to MSWord: a reply
Tue, 18 Mar 2008 00:23:47 -040
In article <lS6zeuGiIHA.2000@news-server>, buzon[NO]@evilfoto.es says...
> Agbeniga David:
> 
> I almost lost this message.....
> I do not have any idea why it get here.
> 
> Very good
> It does what I asked for.
> Thanks a lot
> Is there a way to indicate where I want the image
> for example centered... it comes at the left border.
> 
> Thanks
> 
> Emilio


Emilio,

You can place it in a <TABLE><TD><TR align="center"
vAlign="middle"><IMG 
src="some.bmp"></TR></TD></TABLE>.

<IMG align="middle"> is another option, but it is deprecated.

-- 
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
Post Reply
about | contact