PowerArchiver Home


Go Back   PowerArchiver Forums > PowerArchiver Command Line (PACL) > General

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-27-2004, 01:20 AM
Pritam Pritam is offline
Senior Members
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Auto Compression of Attachements sent with email

I am working on a small project idea. The objective of this is to compress any attachements present in a email (when the user clicks the 'Send' button). Before the email is sent the program(dll) has to compress the attachements and reattach them to the mail. This will significantly reduce the bandwidth being used by emails which are sent in n numbers.

At 'Siemens' we use Powerarchiver as a standard zip tool.
I would like your help in this area as how to integrate powerarchiver with Outlook.

Awaiting your reply,
Reply With Quote
  #2  
Old 01-19-2005, 04:33 PM
lookdaditsme lookdaditsme is offline
Senior Members
 
Join Date: Jan 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
'Here's something to get you started - you can adjust it to suit your
'needs, multiple attachments, error checking etc.. ***THIS IS BARE BONES***
'In your Outlook VBA Code window paste this into "ThisOutLookSession"
'Then create a new email message with an attachment and click send
'Your email will now have an attachment called "Little.zip"
'Make sure C:\Temp exists, again this is bare bones!
'Assumes pacomp.exe is on your system path
'Tested with Outlook 2003

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
myZipSend
End Sub

Sub myZipSend()

Dim myOlApp As Outlook.Application
Dim myInspector As Outlook.Inspector
Dim myItem As Outlook.MailItem
Dim myAttachments As Outlook.Attachments
Set myOlApp = CreateObject("Outlook.Application")
Set myInspector = myOlApp.ActiveInspector
If Not TypeName(myInspector) = "Nothing" Then
If TypeName(myInspector.CurrentItem) = "MailItem" Then
Set myItem = myInspector.CurrentItem
Set myAttachments = myItem.Attachments
myAttachments.Item(1).SaveAsFile "C:\Temp\" & myAttachments.Item(1).FileName
Shell "pacomp -a C:\Temp\Little.zip C:\Temp\" & myAttachments.Item(1).FileName, vbHide
myAttachments.Item(1).Delete
Sleep 1000
myAttachments.Add "C:\Temp\Little.zip"
Else
MsgBox "The item is of the wrong type."
End If
End If

End Sub
Reply With Quote
  #3  
Old 01-20-2005, 05:41 AM
ivan's Avatar
ivan ivan is offline
Alpha tester
 
Join Date: Jun 2001
Location: Croatia
Posts: 1,077
Thanks: 0
Thanked 9 Times in 8 Posts
Thanks lookdaditsme for his help!

PowerArchiver Outlook Plugin with many features will come out very soon (at the same time as v9.2) so you will have this integration transparently.
__________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
PowerArchiver Support
http://www.powerarchiver.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Reply With Quote
  #4  
Old 01-20-2005, 06:35 AM
TBGBe's Avatar
TBGBe TBGBe is offline
Still Mainly Lurking
 
Join Date: Jul 2001
Location: UK
Posts: 2,151
Thanks: 6
Thanked 102 Times in 94 Posts
Quote:
Originally Posted by ivan
Thanks lookdaditsme for his help!

PowerArchiver Outlook Plugin with many features will come out very soon (at the same time as v9.2) so you will have this integration transparently.
That will be for PowerArchiver - will it also be compatible with PACL ?
__________________
Terry

WinXP SP3
Reply With Quote
  #5  
Old 01-22-2005, 03:44 PM
ivan's Avatar
ivan ivan is offline
Alpha tester
 
Join Date: Jun 2001
Location: Croatia
Posts: 1,077
Thanks: 0
Thanked 9 Times in 8 Posts
No, but all the work will be transparent (without any windows). Plus, you will have enought options to set in Outlook Options dialog.
__________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
PowerArchiver Support
http://www.powerarchiver.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:43 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.