smason48
New Member
- Joined
- Jan 12, 2010
- Messages
- 15
When using the code below, it lets me select a PDF file to import, it does it and it works great, HOWEVER, if the person were to delete that PDF and run it again (for example an updated version of the same file) it seems to only show me a blank square box. It seems its storing something however upon inspection the file size hasnt changed and Excel doesnt claim that there are any special objects.
Any ideas? Ideally I'd like to be able to import a file, then if deleted, when the same file is reimported for it to act as it did first time.
Any ideas? Ideally I'd like to be able to import a file, then if deleted, when the same file is reimported for it to act as it did first time.
Code:
Sub ImportAttachment2()
Range("A2").Select
ActiveSheet.OLEObjects.Add(classtype:="AcroExch.Document.7", link:=False, DisplayAsIcon:=False).Select
Selection.Name = "Attachment 2"
'MsgBox ("File Import Completed")
End Sub