Alaska Software Inc. - Copy Excelsheet into a Worddocument
Username: Password:
AuthorTopic: Copy Excelsheet into a Worddocument
Hans JeldersCopy Excelsheet into a Worddocument
on Fri, 02 Apr 2010 01:02:47 +0200
Hello,

In my application I create  excel sheets and put data in it with activeX.
Before I close a sheet  to make another sheet I want to copy the contents of
that excelsheet with activeX into a Word document as a bitmap image for
instance on page 3 of the word document.
Anyone knows if this is possible and how to do this?
J.A. Diego KerejetaRe: Copy Excelsheet into a Worddocument
on Fri, 02 Apr 2010 11:20:00 +0200
Hi Hans,

>
> In my application I create  excel sheets and put data in it with activeX.
> Before I close a sheet  to make another sheet I want to copy the contents
> of
> that excelsheet with activeX into a Word document as a bitmap image for
> instance on page 3 of the word document.
> Anyone knows if this is possible and how to do this?

You have to use the following method:

#define wdPasteMetafilePicture 3
#define wdPasteBitmap 4

      oWordDoc:paragraphs:last:range:pasteSpecial( 0, .F., 0,
.F.,wdPasteBitmap )

Regards. Diego
Hans JeldersRe: Copy Excelsheet into a Worddocument
on Sat, 03 Apr 2010 01:02:48 +0200
Thanks Diego,

I see that this method is pasting the bitmapimage into the word file.
But how I put it on page 3 of the document?
And what's the method to copy the entire content of the excelsheet?



"J.A. Diego Kerejeta" <diegokerejeta@euskalnet.net> schreef in bericht 
news:5d69f408$683fc092$5b41d@news.alaska-software.com...
> Hi Hans,
>
>>
>> In my application I create  excel sheets and put data in it with activeX.
>> Before I close a sheet  to make another sheet I want to copy the contents
>> of
>> that excelsheet with activeX into a Word document as a bitmap image for
>> instance on page 3 of the word document.
>> Anyone knows if this is possible and how to do this?
>
> You have to use the following method:
>
> #define wdPasteMetafilePicture 3
> #define wdPasteBitmap 4
>
>      oWordDoc:paragraphs:last:range:pasteSpecial( 0, .F., 0,
> .F.,wdPasteBitmap )
>
> Regards. Diego
>
>
J.A. Diego KerejetaRe: Copy Excelsheet into a Worddocument
on Sat, 03 Apr 2010 09:17:50 +0200
Regards. Diego


test.zip
Hans JeldersRe: Copy Excelsheet into a Worddocument
on Sat, 03 Apr 2010 10:49:33 +0200
Diego,

You are fantastic.
Now I can go on.

thanks

"J.A. Diego Kerejeta" <diegokerejeta@euskalnet.net> schreef in bericht 
news:7a5ac178$51401533$5ddad@news.alaska-software.com...
> Regards. Diego
>