Results 1 to 6 of 6
  1. #1
    joshynaresh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    131

    Zipping file of my desktop with Ms Access 2007


    I want to zip my file of my Desktop with help of MS Access 2007. Can it is possibleThank You in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    What do you mean by 'zip my file of my Desktop'? Desktop is the computer display. Do you mean your database file?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    joshynaresh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    131
    My database as well as jpg,doc,xls etc files which i want to zip(I mean to compress my file)

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Here is code I use to create and fill zip file.

    Dim strZip As String
    'create empty zip folder
    'found this on web, no idea what the Print line does but if it isn't there, this won't work
    Open strZip For Output As #1
    Print #1, "PK" & Chr$(5) & Chr$(6) & String(18, 0)
    Close #1
    'copy file into zip folder
    Dim objApp As Object
    Set objApp = CreateObject("Shell.Application")
    'variable for source file doesn't seem to work
    'also double parens not in original example code but won't work without
    objApp.NameSpace((strZip)).CopyHere "drive\path\filename"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    joshynaresh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    131
    it provide run time error 75

    Plz provide me creating zip folder code with zip folder name

    thank you in advance

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    strZip is the zip file name

    strZip = "drive\path\filename.zip"

    The CopyHere drive\path\filename is the file to copy into zip.

    Construct the drive\path\filename strings however you want.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2007 Saving File
    By Johnno in forum Access
    Replies: 4
    Last Post: 08-24-2012, 11:20 PM
  2. Problems with zipping a db
    By Owl in forum Access
    Replies: 10
    Last Post: 02-09-2012, 05:55 PM
  3. import excel file to access 2003 yes, access 2007 no
    By stapik in forum Import/Export Data
    Replies: 9
    Last Post: 07-27-2011, 07:09 AM
  4. Access 2007 MDE file
    By BaldFox in forum Access
    Replies: 1
    Last Post: 02-07-2011, 08:38 AM
  5. Replies: 1
    Last Post: 06-02-2009, 04:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums