+ Reply to Thread
Results 1 to 7 of 7

Activate contents of Embedded Zip file

  1. #1
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Activate contents of Embedded Zip file

    I have zip files (containing 1 only file each eg. excel, pdf, word msg etc) embedded in a workbook.
    I can activate an embedded zip file/folder with vba, but is it possible to then activate the contents of the activated zip folder once the zip folder of the zip file is open.
    The zip file/folder will only ever contain 1 file (of any type).
    Ideally i would like to close the zip folder window once the file contained within is activated/launched.

    Any solutions would be appreciated.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Activate contents of Embedded Zip file

    Hi wotadude
    This site may help
    http://www.rondebruin.nl/windowsxpzip.htm
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Re: Activate contents of Embedded Zip file

    Thanks Pike,
    I have the zipping all under control.
    I have the unzipping all under control.
    But it is the activation of the zip file within the opened zip folder that i want to activate/open. and then ideally have the zip folder window close after that.

    The reason for zipping the embeded files is so that the embedded files are as small as possible. And that when a excel 2003 user activates a 2007 .xlsm workbook that was earlier embedded in the workbook, the 2007.xlsm workbook will be seen as an invalid file due to unrecognised format. Which is a common occurance here. Where as if you activate the 2007 .xlsm file from an embeded zip file containing the 2007 .xlsm file, a file conversion will take place (due to file conversiion utilities we have installed).

    Any help with this would be much appreciated

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Activate contents of Embedded Zip file

    Hello wotadude,

    It would help to see the code you have to zip and unzip the files, since this can be accomplished in VBA without opening a zip window. Here is a macro to run any program that has a registered file extension. Copy this code into a standard VBA module.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Re: Activate contents of Embedded Zip file

    Your suggested code is fine to launch an external file.
    But the file i want to launch is that embedded within my workbook.
    I am using code (as per Ron DeBruin) to zip the selected file. Then embedding that zip file manually or via vba to workbook.

    Refer attached sample workbook that contains a sample embedded zipped workbook.

    then a call macro below to activate it.
    Please Login or Register  to view this content.
    However it launches an explorer window with its contents, not the file contained within itself.
    i want to open the file contained within the zip file/folder. The file could be of any type.
    Then close the zip folder window.
    Attached Files Attached Files

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Activate contents of Embedded Zip file

    why not open the workbook select the shape then close the workbook?

  7. #7
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Re: Activate contents of Embedded Zip file

    Thanks for the suggestion, but not sure i understand the logic of what you suggest.
    I do not want to close the host workbook after opening the embedded zip file/folder. I want to open/activate the embedded zip file contents, and keep the host work book open.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1