Hi Nikhil
If you just need to know if an image exists I previously created a vbo to list all images and output the names in a collection then i just loop the collection to see if the image name I want is listed. The code is below:
Dim wb, ws, excel, sheet As Object
wb = GetWorkbook(Handle, Workbook)
ws = GetWorksheet(Handle, Workbook, Worksheet)
wb.Activate()
ws.Activate()
excel = ws.Application
sheet = excel.ActiveSheet
Dim Table As New DataTable
Table.Columns.Add("Name", GetType(String))
Dim image as Object
For Each image In wb.Worksheets(Worksheet).Shapes
Table.Rows.Add(image.Name)
Next
Images = Table
-----------------------
Inputs:
Handle
Workbook
Worksheet
Outputs:
Images
Hope this helps
🙂------------------------------
Michael ONeil
Technical Lead developer
Everis Consultancy
Europe/London
------------------------------
#MVP