Insert picture

G

Guest

Hi,

I have to insert a picture into an excel 2000 worksheet within MATLAB R14,
using COM-commands.
I very new to it, the commmands that worked so far to insert text are:

Excel = actxserver('Excel.Application');
%% open document (omitted), then
Activesheet = Excel.Activesheet;
....
Activesheet.Range(['A6']).Value = 'testvalue';

No I'm searching for the right object, method or property to insert a
picture, stored in a file (preferably) or in the clipboard.

I tried:

Activesheet.Range('A25').Select;
pic = Activesheet.Pictures.Insert('C:\mypic.tiff').Select

But I get the error message:
"No appropriate method or public field Pictures for class
Interface.Microsoft_Excel_9.0_Object_Library._Worksheet."

Dou you have any suggestions??
Thanks,
Cannabibal
 
D

David McRitchie

Try searching for words like
catalog picture*

If it really is for a catalog, I'd suspect that Word would be better. There
have also been postings involving Access.

Merge Pictures and Words - Oh My!, by Cindy Meister, creates a catalog from text wording and external pictures from an Excel
database. [photos, photographs] Also see extracting JPG / GIF files
[-- file:///C:/copiedsite/dmcritchie/excel/xl2gif.htm --] from an Excel document (charts).
http://www.computorcompanion.com/LMMArticle.asp?ID=126
Computer Companion, E-zine article

Linking to Photos
[-- http://groups.google.com/[email protected] --], Debra Dalgleish (short posting), similar,
less explanation.




Cannabibal said:
Come on, there must be somebody here who has a hint or comment...

Cannabibal


Cannabibal said:
Hi,

I have to insert a picture into an excel 2000 worksheet within MATLAB R14,
using COM-commands.
I very new to it, the commmands that worked so far to insert text are:

Excel = actxserver('Excel.Application');
%% open document (omitted), then
Activesheet = Excel.Activesheet;
...
Activesheet.Range(['A6']).Value = 'testvalue';

No I'm searching for the right object, method or property to insert a
picture, stored in a file (preferably) or in the clipboard.

I tried:

Activesheet.Range('A25').Select;
pic = Activesheet.Pictures.Insert('C:\mypic.tiff').Select

But I get the error message:
"No appropriate method or public field Pictures for class
Interface.Microsoft_Excel_9.0_Object_Library._Worksheet."

Dou you have any suggestions??
Thanks,
Cannabibal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top