Send to Compressed Folder

Hi,

Can anyone tell me if there is a way of replicating the Send To > Compressed 
(zipped) folder function that is available in explorer from within my Access 
vba code?

My program will operate in an Access2003 / Windows XP environment.

Thanks,

Jim 


0
Jim
11/2/2007 3:41:44 PM
access 16762 articles. 3 followers. Follow

1 Replies
2116 Views

Similar Articles

[PageSpeed] 3

Hi All,

Actually I think I have found the answer to my own question (for once!) But 
in case anyone else wants to do the same thing, the following bit of code is 
my adaptation of something posted by Ron de Bruin.

Sub Zip_BackEnd()

    Dim strMDBFile
    Dim strZIPFile
    Dim oApp As Object

    strMDBFile = "C:\Test.mdb"
    strZIPFile = Left(strMDBFile, Len(strMDBFile) - 4) & ".zip"

    If Dir(strZIPFile) <> "" Then
        'zip file already exists, so delete first
        Kill strZIPFile
        'hold up processing until zip file deleted
        Do Until Dir(strZIPFile) = ""
        Loop
    End If

    If Dir(strZIPFile) = "" Then
        'Create empty Zip File
        NewZip (strZIPFile)

        'Copy the file in the compressed folder
        Set oApp = CreateObject("Shell.Application")
        oApp.NameSpace(strZIPFile).CopyHere strMDBFile

        'Keep script waiting until Compressing is done
        On Error Resume Next
        Do Until oApp.NameSpace(strZIPFile).items.Count = 1
        Loop
    End If

End Sub



Sub NewZip(sPath)
'Create empty Zip File
'Changed by keepITcool Dec-12-2005
    If Len(Dir(sPath)) > 0 Then Kill sPath
    Open sPath For Output As #1
    Print #1, Chr$(80) & Chr$(75) & Chr$(5) & Chr$(6) & String(18, 0)
    Close #1
End Sub

Hope this helps someone!
Jim






"Jim Franklin" <pleasedonotusethis@hotmail.com> wrote in message 
news:YyHWi.6042$7k5.311@newsfe1-gui.ntli.net...
> Hi,
>
> Can anyone tell me if there is a way of replicating the Send To > 
> Compressed (zipped) folder function that is available in explorer from 
> within my Access vba code?
>
> My program will operate in an Access2003 / Windows XP environment.
>
> Thanks,
>
> Jim
> 


0
Jim
11/2/2007 5:24:38 PM
Reply:

Similar Artilces:

Proxy Error on a public folder in Exchange 2000
In Application Events i have tons of this errors: "Unable to create proxy folder object for the folder {name of the folder in public folders} in Active Directory" Any clue from where it may come from? Thanks in advance Fausto what's the event ID? does this apply? http://support.microsoft.com/kb/309793/en-us -- Susan Conkey [MVP] "Fausto" <dieffe@gmail.com> wrote in message news:1174982340.069361.182990@d57g2000hsg.googlegroups.com... > In Application Events i have tons of this errors: > > "Unable to create proxy folder object for the fo...

Public folder error c103b404
When checking public folders we get the following error The SSL certificate server name is incorrect. ID no: c103b404 Exchange System Manager We have been through the steps in http://support.microsoft.com/?id=324345 This is an SBS server. All that was done was to remove the locally generated Cert and install a Cert from Thawte. ...

Cant send urls, pages
Just upgraded from 2002 to 2003. Now I can not send interesting websites to friends, associates, or send links the way I used to. I went in and adjusted several security levels to no avail. It is probably something simple but I am not seeing it ~Thank Michele Katmido <anonymous@discussions.microsoft.com> wrote: > Just upgraded from 2002 to 2003. Now I can not send interesting > websites to friends, associates, or send links the way I used to. I > went in and adjusted several security levels to no avail. Include the URL in a plain text message and it will get through. Don...

Large Emails Keep Resending: Send Timeout Error
Using Outlook 2003 in WinXP. Upgraded from Outlook 2000. Emails with large attachments, usually around 1MB and larger, when sent, will generate an error message that the send operation timed out. Outlook then attempts to resend the email accordingly. The emails never leave the Outbox or appears as a Sent Item. The recipients however, end up receiving multiple copies of the email as a result of the resends. Outlook isn't aware that the email was sent. Can't find a post in the knowledge base that addresses this. Any help would be most appreciated. Thx! Clark Smith Never ...

Unread public folder patch (KB836686)
I had previously installed the update mentioned here: http://support.microsoft.com/?kbid=836686 to resolve the bogus unread count for public folders in E2k3. It worked great - then I installed SP1 for E2k3 and the problem resurfaced. I checked the KB article and noted that the "Applies to" section now notes SP1 so I called them up and got the update again. When I try to apply it though it tells me that it's not valid for the service pack I'm running and exits itself. Has anyone managed to get this patch to install on E2k3 SP1? Any idea why Microsoft didn't include...

Sending/Receiving e-mail #2
When I try to send/receive e-mail I get an error message (0X80042108)Outlook is unable to connect to your incoming (pop3) e-mail server. I have mail and can access it through web mail. My ISP is Road Runner and virus protection is Tren Micro Internet Security/2004. Hi Steve, please read this article, http://support.microsoft.com/default.aspx?scid=kb;en-us;318790 -- Gestern gings noch, ICH habe nichts gemacht! ;-) Bravestar@Datenschutzministerium.de "Steve" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag news:2decd01c46aaa$da7323e0$a501280a@phx.gbl... > Wh...

Public folders not replicating between 2003 and 2007
Hi, currently we are in a transisition state between exchange 2003 and 2007. However, I've an issue with the public folders. It doesn't seem to replicate. The hierarchy doesn't appear on the exchange 2007 side. When I choose: Synchronize Hierarchy on the Exchange 2003 server the eventlog reports that messages are being sent, however, nothing happens on the exchange 2007 side. I've also added the exchange 2007 server to the replication list on all public folders using system manager on the exchange 2003 server, but that has no effect either. The SMTP logs of 2003 and 2007 re...

Need a simple macro that will import any one of a number of text files in a folder
I'm having problems coming up with a macro that will allow me to import a text file of choice from my default file location that I have set up with Excel which contains several text files. I want the macro to open a "Open" file dialog window where I can then choose the text file of choice. I also need it to open the file as delimited, starting at row 23 and with the tab selected as the only delimiter. Please help... thanks, steve Steve I have been using the following for several years to obtain a spreadsheet from a .csv file downloaded from a bank. You will need to add the...

WLM sending problem
I have set up 2 email accounts on Windows Live Mail on a new netbook running Windows 7 Starter. The default account (mine) works fine. The other account (my wife's) receives fine but will not send. The error message ID is 0x800CCC0D. The server is smtp@ultrasw.com. That same server works for my email. Protocol is SMTP; Port 25; Secure (SSL) No; Socket error 11003. TIA for any help you can give. If I have missed a posted solution to this, I apologise. Don Eagle This is a multi-part message in MIME format. ------=_NextPart_000_004D_01CAE0C6.8D00D970 Content-Typ...

Outlook 2003
Hi, i'm using outlook 2003 with my pop3 company account, with all my personal forlders, account, calendar ,etc... I'm using an exchange account with another company via OWA, with its shared and personal folders ... Can i use both account in Outlook 2003 ??? i tried but i can only use one "personal folders" shared by two accounts ... i want to take accounts separated in toe root "Personal Folders". hope explain it clearly ! ugh! thanks in advance for ideas and support roy Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php you wou...

When moving pst files into 2003 I get extra personal folders
I've recently upgraded to Outlook 2003 and after moving files from two previous versions of Outlook, I keep getting 2 extra personal folders added to my folder list. I can get rid of them using /cleanpst and /cleanprofile. But when I restart Outlook again the 2 personal folders are back. What to do? Your advice is appreciated. Thanks, Ken Hapa Molowa wrote: > I've recently upgraded to Outlook 2003 and after moving files from > two previous versions of Outlook, I keep getting 2 extra personal > folders added to my folder list. I can get rid of them using /cleanpst > and ...

Newbie
Hi all Strange situation here! A user has succeeded in sending an email with 15 Mb plus of attachments. But he cannot now move this message into a Public Folder for general access. Anyone know why this should be? He has access to this Public folder and has regularly moved mail items to it. System is: Exchange Server 2003, on Win2003 Server, with Outlook 2003 clients. Any help appreciated Phil Verify the permissions on the public folder through Outlook. In Outlook, highlight the pf, go to properties, go to summary tab, what permissions is he granted? James Chong MCSE + Messaging, MC...

Send To Mail Recipient problem
I am having an issue with using the 'mail to pdf' option in some reports. The users with the problem are GP9 sp1 with Adobe std 8. They can run a service call report and use the email option fine but when they try to do the same with an invoice the window never pops up for the new email message. in the Customer Internet and email info...(same with vendor) you have to put the "mailto:" without the quotes in the email address eg: mailto:mycustomer@company.com Tami "Chris" wrote: > I am having an issue with using the 'mail to pdf' option in some r...

No signature in Tools/Send to/mail recipient
If I have a Word document opened and I select "Tools" then "Send To" then "Mail Recipient" my signature (including a confidentiality statement) is not included in the email. This is also the case when I try "Tools/Send to/Mail Recipient (as attachment) which is more surprising to me. Is there any way to make sure my signature and confidentiality statement are appended to all messages sent through Outlook (regardless of how the message is started)? Thanks! -- Rick B No, this is because Word only loads a stub of Outlook. If you want all settings...

Automatically populating distribution lists in a public contact folder
We have a custom application which we wrote to add contacts in a public contact folder and to create and populate distribution lists in the same folder. One one machine, everything works fine, but on another machine, the distribution lists do not always get populated. Our application does not indicate any sort of error. We are using the outlook application automation object to create these items. We have been unable to determine why it works on one or two machines, but only sometimes on others. All machines are using Outlook 2003 SP1. ...

Problem with Outlook sending attachments endlessly
One of my PCs is having a problem sending attachments through Outlook XP. When sending attachments of even moderate size (~750kb), the attachment is sent and then queued again and then sent and then .... Outlook endlessly sends the attachment, flooding my poor recipients. I have tried two completely different SMTP servers with the same result. The odd thing is that my other PC, also with Outlook XP installed, has no problems sending attachments. Any ideas on this one? After queuing an email with an attachment this morning, I came back from lunch and found that it had sent the same email 7...

How to always allow outlook to send email from MYOB automatically.
I always get the message: "A program is trying to send an e-mail message on your behalf. If this is unexpected, click Deny and verify your antivirus software is up-to-date. For more information about e-mail safety and how you might be able to avoid getting this warning, click help." But my antivirus is up-to-date and the help section is useless. When I have to send over 100 emails or more at once, I have to sit there and click on 'allow' every 5 seconds. This is very fustrating. Can anyone help? Tim. MYOB Premier V12.5 Outlook 2007 Tim - MYOB P12.5 ...

User Mailbox that more than one person sends e-mail from
Do to a SARBOX requirement we were told to set all user passwords expire. The issue is we have some users that we set up where more than one person sends e-mail from it. We set the mailbox up in outlook for the people that need to send mail as that user. When those user's password expires the person trying to send - gets an error and is not allowed to send. Is there any way to get around this issue? Thanks Jennifer Jennifer: For your shared mailbox, I would disable that account. Then, create a security group that contains as members everyone that should have permissions t...

Enable Badmail Folder
Hello I have Exchange2003 Std. with SP1 installed. Since them Badmail Feature is disabled. I tried to enable it again with following KB Article: http://support.microsoft.com/default.aspx?scid=kb;en-us;884068 After change, i reboted the server, without succes. It doesn't work. Has anyone a idea? Thank you Regards, Patrick On Tue, 4 Oct 2005 04:25:03 -0700, "Patrick" <Patrick@discussions.microsoft.com> wrote: >Hello >I have Exchange2003 Std. with SP1 installed. >Since them Badmail Feature is disabled. >I tried to enable it again with following KB Article: &g...

A large number of messages are pending in the e-mail server send q #2
Hello world. I have been getting a vast number of email in the out queue starting this past Monday. I have freezed those queues and delete all the messages addressed from my postmaster address to Envelope Recipients:SMTP:wovowtwasqi@ntli.net; even though the q is frozen the number of messages is still increasing how can I delete those Queues? "A large number of messages are pending in the e-mail server send queue. Verify that you have Internet connectivity. If you can view Web sites normally, contact your Internet service provider (ISP) to determine if there is a problem with the...

Sending mail from a Public folder
My customer wants to send email from a public folder. Theyt want the mail to look like it came from Surveys@company.com. They would like it so multiple people can send from this public folder. Any ideas how to do this in Exch 2003 Thanks -- J Wilmer Grant Send as Permissions to the PF. On Mon, 4 Apr 2005 13:43:05 -0700, "jwilmer" <jwilmer@discussions.microsoft.com> wrote: >My customer wants to send email from a public folder. Theyt want the mail to >look like it came from Surveys@company.com. They would like it so multiple >people can send from this publi...

Can Receive email But CAN'T SEND email
The connection to the server has failed. Subject 'Fw: [joycelist2] Almost 2 feet of snow and still have power. Thank you all of Heaven!!', Account: 'nixjud@bellsouth.net', Server: 'smtp.att.yahoo.com', Protocol: SMTP, Port: 25, Secure(SSL): Yes, Socket Error: 10060, Error Number: 0x800CCC0E Have you ever been able to Send using those settings? GranyNix wrote: > The connection to the server has failed. Subject 'Fw: [joycelist2] Almost > 2 > feet of snow and still have power. Thank you all of Heaven!!', Account: > 'nixjud@bellsouth....

Can't see Public Folders after upgrading to 2003
I was able to view public folders through Outlook on my machine when it was running Outlook 2000. Then I upgraded to 2003 and now I can't see a public folders node to the tree hierarchy in the Folder List pane. Any idea why? Much thanks, Jesse Could be... that you are looking at the Mail folder structure. In Outlook 2003, when you click the Mail icon in the Navigation Pane, you see only Mail based folders... Public Folders are not included. One of the smaller icons at the bottom of the Navigation Pane on the left is labeled Folder List. This displays the entire folder list... an...

Error when sending email in CRM
I am running SBS 2003 and CRM 1.2 on the same server. The following error occurs when I send an email through our CRM web: Error Description: An unexpected error occurred. Error Details: An error occurred attempting to dispatch the email : A SOAP error occurred: '80040154Class not registered ' Error Number: 0x80040216 Any thoughts??? Douglas Have you installed the CRM Exchange router? "DouglasBHahn" <DouglasBHahn@discussions.microsoft.com> wrote in message news:20F33E9B-5C03-4B60-B5A7-4D71E70AF9A5@microsoft.com... > I am running SBS 2003 and CRM 1.2 on the ...

copying data from folder to folder
I have folders on a server, one folder for each branch office. Within each branch folder, I have several folders labeled Warehouse, etc.. In the warehouse folder, I have several excel workbooks (one for each month, etc.), each comprised of 8 to 10 worksheets. If I add lines in one branch warehouse worksheet, can I have the other branch warehouse worksheets set up to copy that data? TIA You can have a "Master" workbook Then link the others to that one, so it can be updated when opened. "RPW" wrote: > I have folders on a server, one folder for each branch office...