A
Anton Rapoport
Hello, Excel experts
I have faced the following problem (I will not be surprised if it cannot be
solved at all in Excel VBA):
Excel allows to embed an OLE object into a worsheet. Manually a user has to
click "Insert" from the main menu, then "Object", then choose the "Create
from file" tab and then select a file to embed. A user is free to embed any
(generic) file with any file extension, e.g. test.zip or test.tst or whatever
which may not be necessarily associated with a Windows application.
My problem is I need to save the embedded file back to a hard disk. Manually
the user has to right-click on the embedded file icon, then choose "Package
Object", then "Edit Package". After that a separate "Object Packager" window
will appear. There in the "Object pckager" window the user clicks "File" and
"Save contents" to save the embedded file as a file back to a user-selected
location.
But how to do it from VBA code? How can I save a file embedded as object
into the sheet back to hard disk?
Thanks a lot for your help in advance,
Anton
I have faced the following problem (I will not be surprised if it cannot be
solved at all in Excel VBA):
Excel allows to embed an OLE object into a worsheet. Manually a user has to
click "Insert" from the main menu, then "Object", then choose the "Create
from file" tab and then select a file to embed. A user is free to embed any
(generic) file with any file extension, e.g. test.zip or test.tst or whatever
which may not be necessarily associated with a Windows application.
My problem is I need to save the embedded file back to a hard disk. Manually
the user has to right-click on the embedded file icon, then choose "Package
Object", then "Edit Package". After that a separate "Object Packager" window
will appear. There in the "Object pckager" window the user clicks "File" and
"Save contents" to save the embedded file as a file back to a user-selected
location.
But how to do it from VBA code? How can I save a file embedded as object
into the sheet back to hard disk?
Thanks a lot for your help in advance,
Anton