Wordmail

A

azito

Ken -
I found my way to you through Sue. Respect your work. I'm a rookie,
trying to learn the ropes. I have an application that monitors a
folder for MSG files. if it sees a file, it uses redemption to import
it to a SQL DB. no problems.

What i need to do now is have Outlook essentially "Send and Save" a
copy of the message to this folder. (Not all messages are sent to this
folder, just certain ones, at user discretion.

Anyway, I've figured out the script, of course, without using Wordmail
- but i'll be honest - the wordmail aspect has gone way above my head.

My users use OL2003, with wordmail as the editor. I just want to be
able to add a button to the wordmail editor which "Sends and Saves"
the message to a static folder. Can you point me in the right
direction?

I'd be grateful.

thanks
az
 
K

Ken Slovak - [MVP - Outlook]

Adding a button to a WordMail item is identical to adding one to an Outlook
editor item. It's managing the UI that's different. Just add your button as
you would for the Outlook editor in the first Inspector.Activate event (not
in NewInspector) and go from there.

To manage anything but Click events from the button is where it gets more
complicated. That and trying to add a button to the Standard toolbar in
WordMail. I never do that, if it's WordMail I create a toolbar instead.

To handle the visibility of the UI you create you need to handle Word
events. Inspector.WordEditor is a Word.Document object. From there you can
get Document.Application to get a handle to the Word.Application object.
Then you handle the Window_Activate event. In that event you check for
Window.EnvelopeVisible. If True it's an email item, if not it's a document.
I then call a procedure that re-instantiates my toolbar and buttons
(otherwise you get automation errors that the property or object is unknown)
and if it's a toolbar I created for that Inspector (checking the Tag
property I add to UI I create) I set it Visible = True, if not I set Visible
= False.

That's pretty much it for the basics. Setting modality on dialogs relative
to the WordMail window and the Outlook ActiveExplorer is where it gets hairy
and proprietary and involves lots of study of what's happening using Spy++
and tons of Win32 API calls.
 

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