A
atvaluesoftware
The following code copies an embedded OLE object and pastes it to the
specified path:
Sub Test()
ActiveSheet.OLEObjects("Object 1").Copy
'paste to activeworkbook's path
CreateObject("Shell.Application") _
.Namespace(ActiveWorkbook.Path) _
.Self.InvokeVerb "Paste"
End Sub
What about pasting the object and giving it a particular filename
during the paste action? With the code given, the object is pasted
correctly. However, by default, the filename used in the pasting is the
filename that was specified during the Insert > Object > Create from
File process (initial insert of the object).
Is there anyway to change the filename used in the paste?
specified path:
Sub Test()
ActiveSheet.OLEObjects("Object 1").Copy
'paste to activeworkbook's path
CreateObject("Shell.Application") _
.Namespace(ActiveWorkbook.Path) _
.Self.InvokeVerb "Paste"
End Sub
What about pasting the object and giving it a particular filename
during the paste action? With the code given, the object is pasted
correctly. However, by default, the filename used in the pasting is the
filename that was specified during the Insert > Object > Create from
File process (initial insert of the object).
Is there anyway to change the filename used in the paste?