Hello
I need some assistance with the below macro.
1. How to get it to delete the old embedded file, the first line of the macro is not working.
2. Is there a way to have the file path change each month. The workbook name changes each month (10.2020) and the workbook and PDF files are stored in monthly folder. The PDF file name stays the same.
3 Can this macro be in my personal workbook instead of the client workbook.
Thank s for any assistance
I need some assistance with the below macro.
VBA Code:
Sub Embed()
'
' Embed Macro
'
'
ActiveSheet.Shapes.Range(Array("Object 775")).Select
Selection.Delete
Range("G11").Select
ActiveSheet.OLEObjects.Add(Filename:= _
"N:\FR\2020\10.2020\Reporting\03. Final PDFs\Individual Reports\Sample.pdf", Link:=False, DisplayAsIcon:=True, IconFileName:= _
"C:\WINDOWS\Installer\{AC76BA86-1033-FFFF-7760-0C0F074E4100}\_PDFFile.ico", _
IconIndex:=0, IconLabel:="Sample").Select
End Sub
1. How to get it to delete the old embedded file, the first line of the macro is not working.
2. Is there a way to have the file path change each month. The workbook name changes each month (10.2020) and the workbook and PDF files are stored in monthly folder. The PDF file name stays the same.
3 Can this macro be in my personal workbook instead of the client workbook.
Thank s for any assistance
Last edited by a moderator: