View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] atvaluesoftware@gmail.com is offline
external usenet poster
 
Posts: 10
Default Pasting embedded OLE objects to specific filename

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?