Page 1 of 1

Teechart to word bookmark

Posted: Thu Mar 22, 2007 8:47 am
by 9637396
Hi

I need to take a teechart and put it to word at a specific bookmark.
The question is do I have to export to file first and then insert from file into word or can I get a teechart into some kind of stream object and insert that into word. Or is it possible to put the teechart opto the clipboard and then paste into word?
I'm using teechart for .net version 2 (I think)

Thanks in advance
Lars Iversen

Posted: Thu Mar 22, 2007 9:16 am
by narcis
Hi Lars,

Using TeeChart for .NET v2 you can export a chart into the clipboard and then use it in word. You'll find an example at All Features\Welcome !\Exporting\Chart Picture\Metafile in the features demo. You'll find the demo at TeeChart's program group.

Posted: Thu Mar 22, 2007 11:59 am
by 9637396
Thanks for the fast answer.

I just realized that I do my charts in the main thread and then I have a seperate thread that writes to word asyncronously:o( Sorry that I brought clipboard up. I can't use that.

So in short I have a list of objects that my main thread writes to. My write-to-word thread then removes the items from that list one at a time.
So I really need to be able to store an exported chart in and object variable and then be able to put it to word from the opbject variable.
I could of course just store a path to where I have saved the picture on disk end then my write-to-word thread could get the file from disk and put it into word. I just don't think that that is very elegant.
Do you have a better solution for me?

Thanks
Lars Iversen

Posted: Thu Mar 22, 2007 12:05 pm
by narcis
Hi Lars,

Yes, TeeChart can also be exported to a MemoryStream. For all TeeChart exporting options please read Tutorial 12 - Exporting and Importing Charts. You'll find tutorials on TeeChart's program group.