new message - menubar/makros/vba

P

Peter Ramsebner

Hi all,

i want to log outgoing messages in a sql server database.
The principal idea is:
1) write a new mail message
2) instead of using the send button, the user have to click a user defined
button wich:
- saves the message (to generate an EntryID)
- send the message
- create a record in my sql server database

The Problem is that new messages doesn't have a customer menu bar and it is
not possible to run vba code or makros.
-> How can i solve this problem?

Any help would be greatly appreciated

Peter
 
P

Peter Ramsebner

Hi Eric,

first, thanks for the expample code 'Sub AddInspectorMenu()'.
If you can't run macros due to security settings, you can create a custom
IPM.Note mail form with VBScript to trap the Send event and put in your db
insert code.

Maybe you have misunderstood my problem?

I have created and executed your 'Sub AddInspectorMenu()' - and it works.
That means, when i open a message there is a new menuitem.
But not in new message items! Additionaly under this condition it's
impossible to run makros manually.

to remember: I need a menuitem in new messages to create a log entry in a
'sql server' database.

Is this so hard to realize?


thanks, Peter
 
P

Peter Ramsebner

Hi Eric,

now it works, but i don't know why not befor?
If this code needs to run on more than one PC, your best approach is to
develop this as a COM Add-In that will add the menus if they don't exist
every time Outlook starts. Then you can declare the menu/button controls
With Events, and call other procedures (such as your database update code)
from the Click event.

A COM Add-In needs to be a executable file?

Finally i don't need the menubar. I have found the send event, so the user
does not need to press a further button (only the normal send button).

To install the code on all workstations my idea was to distribute the
VbaProject.OTM file.
Are there better methods?


thanks, Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top