B
Bllich
hello,
I have winForm app and I have some text and pictures that I
want to save into a word file when I read it from a database.
I don't know how many text or pictures do I have for one
value in a database, it varies from record to record..
I've seen some classes on the net, but I want to use one from
Microsoft, so I Added a reference Microsoft Word 9.0 object library
and done:
private void button1_Click(object sender, EventArgs e)
{
Word.DocumentClass nw = new Word.DocumentClass();
nw.Content.InsertAfter("fff");
Bitmap MyBitmap = new Bitmap("C:\\a.jpg");
Clipboard.SetImage(MyBitmap);
nw.Content.Paste();
Clipboard.Clear();
nw.Save();
}
and I don't see text
"fff"
when Word window comes up, I just see the "a.jpg" image...
though when I do - undo (Ctrl+Z), I get the "fff"
so I know it pasted the image over the text!
I know that using clipboard is out of the question
and obvieously doesn't work..
Please help!
I have winForm app and I have some text and pictures that I
want to save into a word file when I read it from a database.
I don't know how many text or pictures do I have for one
value in a database, it varies from record to record..
I've seen some classes on the net, but I want to use one from
Microsoft, so I Added a reference Microsoft Word 9.0 object library
and done:
private void button1_Click(object sender, EventArgs e)
{
Word.DocumentClass nw = new Word.DocumentClass();
nw.Content.InsertAfter("fff");
Bitmap MyBitmap = new Bitmap("C:\\a.jpg");
Clipboard.SetImage(MyBitmap);
nw.Content.Paste();
Clipboard.Clear();
nw.Save();
}
and I don't see text
"fff"
when Word window comes up, I just see the "a.jpg" image...
though when I do - undo (Ctrl+Z), I get the "fff"
so I know it pasted the image over the text!
I know that using clipboard is out of the question
and obvieously doesn't work..
Please help!