Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Automatically create secured Excel attachments (Read 1822 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Automatically create secured Excel attachments
21.12.09 at 13:03:20
Automatically create secured Excel attachments
What I am trying to do is this:

1. I have an Access application running on a CITRIX server

2. People who use that Access application will sometimes create Excel
"reports" - but those reports are automatically created (via VBA code in
Access) as an Outlook attachment. No other option exists.

3. Those Excel "reports" contain data that needs encryption because of
its sensitivity.

4. I want all of the Excel attachments to be automatically encrypted.

Summary: when the user presses an Access button, an Excel document is created and an Outlook email, with the Excel document, "pops up" on the screen. The user can modify an email address or cancel the send process or choose to send the email.

MS Access controls Outlook and the user does not even see Outlook
available as an option

Thank you for the detailed information. You can use the encOffice API to achieve what you want.
How this would work is basically like this. In your application, where you create the Excel file but before you coded to send the file using Outlook you would add code that looks like this:
Dim objEncXLS as Object
Dim strSecuredFile as string
Set objEncXLS = CreateObject("encOffice.clsEncXLS")
objEncXLS.Constructor1 ExcelApp
objEncXLS.SaveEncrypted objWorkbook, "c:\yourfile.xls", strSecuredFile, "a very strong password"
Set objEncXLS = Nothing
I assume you already have a reference to the Excel.Application object in the ExcelApp variable.
You need to put your password instead of "a very strong password"
You need to pass the full path to your Excel file instead of "c:\yourfile.xls"
The unsecured file will remain unchanged.  
The full path to the secured file will be returned in strSecuredFile.
Pass this variable to Outlook when attaching the Excel file.
Please also have a look at this topic where I explain the API:
encOffice API
Back to top
« Last Edit: 21.12.09 at 13:05:48 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1