By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,663 Members | 1,827 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,663 IT Pros & Developers. It's quick & easy.

MS Excel: Zip a file

ammoos
100+
P: 100
Hi Friends

I am developing an excel application for e mail the copy of active worksheet. I successfully developed that functionality but my issue is sometimes this mail goes to spam folder since that work book have some macros.. so I decided to zip the copy of workbook before sending.. To zip the file I need to know the path where WinZip is installed.. How can I get the path where this winzip is installed... Can anyone help me?

Thanks

Ammoos
May 18 '09 #1
Share this Question
Share on Google+
4 Replies


Denburt
Expert 100+
P: 1,356
Although I doubt zipping it will work you might want to verify it by sending one manually before spending time heading down the wrong road. If that ODES work then take a look at this article and let me know if it helps.
http://support.microsoft.com/kb/185476
May 18 '09 #2

Denburt
Expert 100+
P: 1,356
I had this problem in the past and zipping didn't work for me and sometimes simply renaming the last three letters or removing them will work but thats depends on the systems and how they are set up to handle such things.
May 18 '09 #3

ammoos
100+
P: 100
Many thanks Denburt .......
May 22 '09 #4

ADezii
Expert 5K+
P: 8,685
@ammoos
You definately cannot assume that WinZip was installed using the Default Path, and you probably do not want to search the entire Hard Drive for the Path. A shot-in-the-dark would be to search all your Environmental Variables to see if there would be some indication as to where WinZip would be installed. To see all the values of your Environmental Variables:
Expand|Select|Wrap|Line Numbers
  1. Dim intCounter As Integer
  2.  
  3. For intCounter = 1 To 100
  4.   If Environ(intCounter) <> "" Then
  5.     Debug.Print Environ(intCounter)
  6.   Else
  7.     Exit Sub
  8.   End If
  9. Next
On a Test PC, typical Output would be (WinZip not installed):
Expand|Select|Wrap|Line Numbers
  1. ALLUSERSPROFILE=C:\Documents and Settings\All Users
  2. APPDATA=C:\Documents and Settings\Security\Application Data
  3. CommonProgramFiles=C:\Program Files\Common Files
  4. COMPUTERNAME=SECURITY-3
  5. ComSpec=C:\WINDOWS\system32\cmd.exe
  6. FP_NO_HOST_CHECK=NO
  7. HOMEDRIVE=H:
  8. HOMEPATH=\
  9. HOMESHARE=\\rpacfso2\security$
  10. LOGONSERVER=\\RPACFSO2
  11. NUMBER_OF_PROCESSORS=1
  12. OS=Windows_NT
  13. Path=C:\Program Files\Microsoft Office\OFFICE11\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Crystal Decisions\2.0\bin
  14. PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
  15. PROCESSOR_ARCHITECTURE=x86
  16. PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
  17. PROCESSOR_LEVEL=15
  18. PROCESSOR_REVISION=0209
  19. ProgramFiles=C:\Program Files
  20. SESSIONNAME=Console
  21. SystemDrive=C:
  22. SystemRoot=C:\WINDOWS
  23. TEMP=C:\DOCUME~1\Security\LOCALS~1\Temp
  24. TMP=C:\DOCUME~1\Security\LOCALS~1\Temp
  25. USERDNSDOMAIN=RPAC.ORG
  26. USERDOMAIN=RPAC
  27. USERNAME=security
  28. USERPROFILE=C:\Documents and Settings\Security
  29. WecVersionForRosebud.8A4=2
  30. windir=C:\WINDOWS
May 23 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.