BusinessObjects Board

Zip up and email large 6.5 DeskI text files with Windows XP

Recently I had a requirement to email out some text files created in Business Objects full client, (DESKI) 6.5 to a user. Since we didn’t want to overload the email system with large files, the thought came up of zipping up the files prior to sending. I found a way to do this with Business Objects. Attached is a report with code that, if you use Business Objects 6.5 full client on a Windows XP computer, (maybe Vista also but I haven’t tried this) you can use the built in Windows compression function to zip up the file and then attach the zip file to an email and send out.

Note, there are 2 modules in here. In one you declare a couple global variables. Then, in the AfterRefresh event the work takes place. You first send your report to a text file on the C:\ drive, (this location and type of file can be modified as needed). Next, you take that text file and zip it up using a shell command which is in another module. Once complete, you continue in AfterRefresh to create the email, set the email parameters, attach the file and send out. You might want to put in some more error handling to suit your situation/as needed.

For References, you’ll need Microsoft CDO for Exchange 2000 Library checked, along with Microsoft Forms 2.0 Object Library.

Hope this will help some folks out as BOB has been an enormous value to me in the time that I’ve used it…
ZipReports.rep (59.0 KB)


nonyup (BOB member since 2008-01-07)