Insert image/excel file as an object into another excel
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-02-19 08:00 PM
Hello Everyone,
I'm working on a use case, where I have to insert a image/excel into another excel. Any suggestions/ideas would be appreciated!
Thanks
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-02-19 12:36 PM
Hi Srinath,
You need to build an custom action in the excel object to achieve the above functionality. Please refer to the below code sample for this :
Dim Xl
Dim Wb
Dim Ws
Dim Ol
Set Xl = CreateObject(""Excel.Application"")
Set Wb = Xl.Workbooks.Add
Set Ws = Wb.Worksheets.Add
Set Ol = ws.OLEObjects.Add(, ""pdf path"", True, False)
With
Ol .Left = Ws.Range(""A1"")
.Left .Height = Ws.Range(""A1"")
.Height .Width = Ws.Range(""A1"")
.Width .Top = Ws.Range(""A1"").Top
End With
Xl.Visible = True
