On 01/11/2016 14:40, Ted Roche wrote:
StackOverflow shows some VBA code where LinkToFile False seems to do the trick (deep in the comments):
https://stackoverflow.com/questions/28181273/how-to-paste-insert-picture-not...
On Tue, Nov 1, 2016 at 10:33 AM, Peter Cushing pcushing@whisperingsmith.com wrote:
objexcel.application.activesheet.shapes.addpicture("H:\img_0536.jpg",.f.,.t.,1,1,100,100)
Hi Ted,
I was using the linktofile set to .f. in the example above and that works but...
Got this from another page:
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.shap...
returnValue = instance.AddPicture(Filename, LinkToFile, SaveWithDocument, Left, Top, Width, Height)
This inserts the picture ok but the left/top are positions (in points) of the upper-left corner of the picture relative to the upper-left corner of the document, whereas I want to insert the picture into a cell (usually the first column). I could start to look at converting row height to points etc but surely there is an easier way to link them to a cell.
Thanks,
Peter
This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.
www.whisperingsmith.com
Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 3700 Fax:0161 831 3715
London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960