drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 543
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi and Thanks in advace!
I am trying to insert a PDF file in a excel file (no problem)
Once the PDF file is inserted I will fix it in a range Top, Left, Wiwdth...
But First I am using trhis Macro
Sub Macro01()
End Sub
Everything works FINE but:
I am trying to insert a PDF file in a excel file (no problem)
Once the PDF file is inserted I will fix it in a range Top, Left, Wiwdth...
But First I am using trhis Macro
VBA Code:
On Error Resume Next: Application.ScreenUpdating = False
Dim wPDF_File As String: wPDF_File = "D:\MyFiles\File 001 2024_Page_021.pdf"
ActiveSheet.Shapes("aaAAaaAAaaAA").Delete
Range("B2").Select
ActiveSheet.OLEObjects.Add(Filename:=wPDF_File , Link:=False, DisplayAsIcon:=False).Select
ActiveSheet.Shapes(ActiveSheet.Shapes.Count).Name = "aaAAaaAAaaAA"
Dim SHP As Shape: Set SHP = ActiveSheet.Shapes("aaAAaaAAaaAA")
SHP.Locked = False
SHP.LockAspectRatio = msoFalse
SHP.RelativeToOriginalSize = msoFalse 'This does NOt work
SHP.Placement = xlMoveAndSize
SHP.PrintObject = True
End Sub
Everything works FINE but:
SHP.RelativeToOriginalSize = msoFalse
How can I fix the Relative to picture size to be False ???