Creating custom replies/forward forms per folder?

P

Paul

I'm running Outlook 2003 standalone (No exchange server involved) and am
looking at ways to create custom replies/forward forms which would be
folder specific.
I was trying to create a custom form and publish it but after many hours
trying to work out how to publish to a local folder through up my arms in
defeat...

Any suggestions appreciated, thanks.
Paul
 
P

Paul

Thats a good point. I'll take a step back and talk about what i'm trying to
achieve.

If you have ever used an email client called 'The Bat!' you will know it has
some wonderful functionality (at folder level' to customize boilerplate text
for replies and forwards as well as scripting which enables you to do many
things on creation of replies or forwards by inserting macros in the boiler
plates.

Specifically what I'd like to set up in Outlook 2003 is a simular system to
do the following:
On clicking the forward or reply menu:
1. Create new message with quoted text at bottom and standard reply message
addressed to the person replied to.
(remember this has to be at the folder level)

2. Attach a file to the email which will always be the same file name but
the contents will be different.

This is the macro that performs this function in 'The Bat!'
%ATTACHFILE="C:\Key Files\YourKey.zip"

I'm not after a step by step on how to achieve this but more of a pointer in
the right direction (i.e. use custom form or vba etc)

Much appreciate your response.

Regards,
Paul.


Sue Mosher said:
Do you really need a custom form? Or are you trying to invoke some
boilerplate text (a custom form isn't the easiest way to do that)?
You publish a form to a folder by choosing Tools | Forms | Publish Form
and browsing to the folder. Publishing a form to a folder, however, does not
affect the behavior of items in that folder, nor can you make a message form
the default for a folder (since messages are meant to be sent not saved in
folders). If you wanted all items arriving in a particular folder to use a
certain custom form, you can use the MAPIFolder.Items.ItemAdd event to
monitor the folder for new items and change the MessageClass of each new
item as it arrives.
 
P

Paul

Hi Sue,

Appreciate your reply but:

That third party package is way too extensive for what I'm wanting to do
(even the lite version). If a programmer cant do this sort of customisation
in Outlook without having to go to extremes then there is something wrong
with the Outllook implmentation.

Here is what I'm trying to accomplish:

1) Customised text (per folder) which could be different depending on
whether I send a reply or forward or new message.
2) Attach a file to a 'Reply' message. This file is anyways the same name
and in the same location.

Is that really so difficult to achieve ?

What i'm confused about is the function of publishing forms. I've managed to
publish a custom form to a specific folder but when I click reply or forward
etc. that form doesn't seem to open as the template for my message. I
believe I'm missing something here about the way the forms are published or
the functionality.

Anyway my thought on publishing a custom form was that I could attach some
code behind that form to achieve what I'm after and it wont affect messages
sent from other folders.

There are some events that seem like they might be applicable i.e Reply
event and Forward event.
and there is an example in the help file which i've kind of got working.

Im trying to trap those events when I click the reply or forward button and
when the message is selected in the list of messages as opposed to being
open. I can try those events when the message has been opened.

There is a property that returns the currentfolder so I could use this to
determine which folder related text to use.
The Attachments class has a add method which should enable me to add the
attachment so this is no problem provided I can determine the current
folder.


I seems to be stuck trying to work out where this code is placed i.e in the
'ThisOutlookSession' or behind a custom form in script etc.

Maybe you or someone can give me a few pointers now or simply let me know
I'm barking up the wrong tree.

Thanks again for your help,

Paul.


Sue Mosher said:
I recommend that you take a look at the Email Templates application from
http://www.emailtemplates.com. It can do what you want and a lot more. Doing
it in Outlook code is potentially *very* complicated.
 
S

Sue Mosher [MVP-Outlook]

Publishing a custom form to a folder doesn't do anything other than make that form available from the Actions menu of the folder. It affects neither existing items, nor new items added to the folder.

The application as you describe it would require an additional component besides a custom form -- VBA code (assuming this is for your own personal use) to convert new items in the folder to use your custom form. Use the MAPIFolder.Items.ItemAdd event and change the MessageClass on each item to point to your custom form. For an example of ItemAdd, see http://www.outlookcode.com/codedetail.aspx?id=456

As for the form itself, you could write code for its Item_Reply and Item_Forward event handlers to manipulate the reply or forward item, but this is where it gets complicated. Outlook supports three different message formats -- plain text, rich text, and HTML. Unless you are using WordMail as your editor, you would need to write different code for each mail format to perform the text insertion. Since WordMail makes it relatively easy -- see http://www.outlookcode.com/codedetail.aspx?id=455 -- I strongly recommend that you use WordMail as your editor. Otherwise, the second easiest solution is to use the third-party Redemption library from http://www.dimastr.com/redemption/.

You could also accomplish the same thing with reply and forward macros in Outlook VBA that operate on the current item. It's inserting text and preserving formatting that's the hard part.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
P

Paul

ok great, thats a big help. Thank you once again for your guidence Sue.

Regards,
Paul

ps. I'd like to complement you on your website. Its very well done and easy
to navigate.



Sue Mosher said:
Publishing a custom form to a folder doesn't do anything other than make
that form available from the Actions menu of the folder. It affects neither
existing items, nor new items added to the folder.
The application as you describe it would require an additional component
besides a custom form -- VBA code (assuming this is for your own personal
use) to convert new items in the folder to use your custom form. Use the
MAPIFolder.Items.ItemAdd event and change the MessageClass on each item to
point to your custom form. For an example of ItemAdd, see
http://www.outlookcode.com/codedetail.aspx?id=456
As for the form itself, you could write code for its Item_Reply and
Item_Forward event handlers to manipulate the reply or forward item, but
this is where it gets complicated. Outlook supports three different message
formats -- plain text, rich text, and HTML. Unless you are using WordMail as
your editor, you would need to write different code for each mail format to
perform the text insertion. Since WordMail makes it relatively easy -- see
http://www.outlookcode.com/codedetail.aspx?id=455 -- I strongly recommend
that you use WordMail as your editor. Otherwise, the second easiest solution
is to use the third-party Redemption library from
http://www.dimastr.com/redemption/.
You could also accomplish the same thing with reply and forward macros in
Outlook VBA that operate on the current item. It's inserting text and
preserving formatting that's the hard part.
 
S

Sue Mosher [MVP-Outlook]

Glad you like it. My next project will be to equip it with an RSS feed.
 

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