ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   printing pictures in excel with VB (https://www.excelbanter.com/excel-programming/318680-printing-pictures-excel-vbulletin.html)

Jean-Marie Bossuyt

printing pictures in excel with VB
 
Hi,

Usually I do use Excel as print medium for my VB programs.
Since I have to print pictures, I have created a XLT template with
an image object at the right place with the right sizes.
The "picturealignment" and "picturesizemode" properties (should)
give me the perfect result.
However when I launch the program, I do not have the possibilty
to fill the image object with the picture, I've tried :
activesheet.image1.picture = loadpicture("c:\MyPicture") but ....
this command works perfectly as an Excel macro (VBA) but not at
all with a standalone VB program.
Any suggestions ? Thank you very much.

Jean-Marie



Tom Ogilvy

printing pictures in excel with VB
 
Do you have a reference set to the OLE Automation Library (stdole2.tlb in
xl2002).

--
Regards,
Tom Ogilvy

"Jean-Marie Bossuyt" wrote in message
...
Hi,

Usually I do use Excel as print medium for my VB programs.
Since I have to print pictures, I have created a XLT template with
an image object at the right place with the right sizes.
The "picturealignment" and "picturesizemode" properties (should)
give me the perfect result.
However when I launch the program, I do not have the possibilty
to fill the image object with the picture, I've tried :
activesheet.image1.picture = loadpicture("c:\MyPicture") but ....
this command works perfectly as an Excel macro (VBA) but not at
all with a standalone VB program.
Any suggestions ? Thank you very much.

Jean-Marie






All times are GMT +1. The time now is 06:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com