Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 25 JAN 2010 01:28:16AM Gordon Heidtman wrote:

Good day

I use the following code, using OLE, to insert a bitmap into a Excel 2003 spreadsheet, and it inserts it no problem in the selected cell:

Row=2
j 	= 1
Col=char(64+j)
CellAddr=$" : Col : "$" : Row
ThisRange=OBJ_EXCEL_RANGE(OXl,CellAddr)
ThisRange-]Select=1
oPictures=oMyActiveSheet-]Pictures
retval=OLECallMethod(oPictures,"Insert",PicFileName)

(The OBJ_EXCEL_RANGE) is a function I use to set the Range)

The problem I have is that when I try to use the same code to write to an Excel 2007 spreadsheet, the bitmap gets inserted at cell B4 regardless of which cell(range) I selected. Thanks, Gordon


At 27 JAN 2010 03:02AM Eric wrote:

At 28 JAN 2010 02:36AM Gordon Heidtman wrote:

Thanks for your help Eric. However, I had already managed to determine the new code by recording Macro's and viewing the code. My problem is that I don't know how to translate that code into a valid OI syntax.ie. How would the call method change from the previous format below?

'retval=OLECallMethod(oPictures,"Insert",PicFileName)'

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/f59d86d3a0bbbe4c852576b600238c01.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1