Creating outlook template
-
Hi all I have a client recently who wants to create a template for outloof with a reference number (auto-increment) whenever he sends out mail to a particular person. From outlook one can create a template but not the auto number. Anyone have any idea on using VB or any other languages to construct this auto running number template? I have not use VB before but understand from feedback that programming for outlook using VB is the simplest. Thanks in advance. Thomas
-
Hi all I have a client recently who wants to create a template for outloof with a reference number (auto-increment) whenever he sends out mail to a particular person. From outlook one can create a template but not the auto number. Anyone have any idea on using VB or any other languages to construct this auto running number template? I have not use VB before but understand from feedback that programming for outlook using VB is the simplest. Thanks in advance. Thomas
I've worked with Outlook and other Office apps before and I find that VB.Net is the easiest language to use when coding for MS Office (mostly because of its oh-so-forgiving nature in allowing direct calls to the Office interop functions instead of using PInvoke and also not having to pass Missing as parameter value in VB). However, VB.Net and C# are quite interchangeable you shouldn't have any difficulties in switching between the two. To create a template you need to have an OFT file (google how to create it if you don't know how, it's pretty simple) and publish it to the client's PC (or a shared folder). The easiest way I can think of is for you to store a running number as an xml file in the client's PC (or a database if necessary) and increment it after each use (i.e. sending an e-mail). If you're also using Exchange Server you might be able to store the data in Exchange (e.g. bind the value to the particulare e-mail address). Ed
-
I've worked with Outlook and other Office apps before and I find that VB.Net is the easiest language to use when coding for MS Office (mostly because of its oh-so-forgiving nature in allowing direct calls to the Office interop functions instead of using PInvoke and also not having to pass Missing as parameter value in VB). However, VB.Net and C# are quite interchangeable you shouldn't have any difficulties in switching between the two. To create a template you need to have an OFT file (google how to create it if you don't know how, it's pretty simple) and publish it to the client's PC (or a shared folder). The easiest way I can think of is for you to store a running number as an xml file in the client's PC (or a database if necessary) and increment it after each use (i.e. sending an e-mail). If you're also using Exchange Server you might be able to store the data in Exchange (e.g. bind the value to the particulare e-mail address). Ed
Edbert P. wrote: If you're also using Exchange Server you might be able to store the data in Exchange (e.g. bind the value to the particulare e-mail address). hi thanks... but just need to ask... how do you bind the data to exchange end extract it to your desired position (i'm totally clueless regarding exchange) eg of mail template Ref: (Running number) 20/09/2005 content...... ............. Regards XXX how to make sure that the number appears at the correct spot. Thomas
-
Edbert P. wrote: If you're also using Exchange Server you might be able to store the data in Exchange (e.g. bind the value to the particulare e-mail address). hi thanks... but just need to ask... how do you bind the data to exchange end extract it to your desired position (i'm totally clueless regarding exchange) eg of mail template Ref: (Running number) 20/09/2005 content...... ............. Regards XXX how to make sure that the number appears at the correct spot. Thomas
You have to store the user's autonumber as a custom field in Exchange. You can extract it using MAPI. I myself prefer Outlook Redemption[^]. It's not free but it's pretty good. To make sure the number appears in the correct spot you can create a message based on the template, read the content of the message, replace the running number location (e.g. you put [[AUTONUM]] in the template) with the current number, and reassign the message content. Or simply write the message content when creating blank message. The safest option is to not use templates at all as the person receiving the e-mail will need to have Outlook and the template installed if you are using custom form, otherwise they will only see the standard e-mail message. Ed