none
How to create an outlook template file ".OFT" using C# RRS feed

  • Question

  • There is a request from our client. That is create a outlook template file using C#, the file will include images & static copy. Then when user opens it thru Outlook( outlook 2007/outlook 2010), only need to type email address, then can send it out. I wanted to search some useful information by GOOGLE, however, I got nothing. Is there anyone working on the Outlook C# programming? If you can tell me component of the ".OFT", then I can make an application thru C# to orgnize relational interface data to create it. Or if you know any programming interface which Microsoft Outlook provides, please feel free to tell me. It would be great if you have any sample codes of C# to create the ".OF" file.

    Any help will be greatly appreciated.

    Thanks in advance.

    Tony

    Thursday, February 16, 2012 2:09 PM

Answers

  • You cannot do what was requested. Tell your client they need a different solution.
     
    Outlook custom form templates (OFT files) can only be created in Outlook. If they have code it can only be VBScript code. C# doesn't enter into this at all. In addition, OFT files cannot be run unless they are published in a forms library on that computer, which has to have Outlook installed. If the forms aren't published they won't run.
     
    When forms are sent, the recipient must have that form published in their Outlook, they must be running Outlook, and the form has to be sent using TNEF (rich text) to preserve the form.
     
    The Outlook programming interface is the Outlook object model, which can be automated. For use with C# you can create an Outlook COM addin or a standalone program, just not custom forms.
     
    For a lot more forms information see the forms pages at www.outlookcode.com.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "wxy8u8u" <=?utf-8?B?d3h5OHU4dQ==?=> wrote in message news:3eac5538-7e67-4fca-8c94-0b0a54ecc68b...

    There is a request from our client. That is create a outlook template file using C#, the file will include images & static copy. Then when user opens it thru Outlook( outlook 2007/outlook 2010), only need to type email address, then can send it out. I wanted to search some useful information by GOOGLE, however, I got nothing. Is there anyone working on the Outlook C# programming? If you can tell me component of the ".OFT", then I can make an application thru C# to orgnize relational interface data to create it. Or if you know any programming interface which Microsoft Outlook provides, please feel free to tell me. It would be great if you have any sample codes of C# to create the ".OF" file.

    Any help will be greatly appreciated.

    Thanks in advance.

    Tony


    Ken Slovak MVP - Outlook
    Thursday, February 16, 2012 2:21 PM
    Moderator
  • If all you want is a richly formatted messages with images (but no custom code in the form itself), OFT is nothing but an MSG file with the unsent bit set and all sender information removed.

    How is OFT file supposed to be opened?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!

    Thursday, February 16, 2012 2:48 PM

All replies

  • You cannot do what was requested. Tell your client they need a different solution.
     
    Outlook custom form templates (OFT files) can only be created in Outlook. If they have code it can only be VBScript code. C# doesn't enter into this at all. In addition, OFT files cannot be run unless they are published in a forms library on that computer, which has to have Outlook installed. If the forms aren't published they won't run.
     
    When forms are sent, the recipient must have that form published in their Outlook, they must be running Outlook, and the form has to be sent using TNEF (rich text) to preserve the form.
     
    The Outlook programming interface is the Outlook object model, which can be automated. For use with C# you can create an Outlook COM addin or a standalone program, just not custom forms.
     
    For a lot more forms information see the forms pages at www.outlookcode.com.

    --
    Ken Slovak
    MVP - Outlook
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
     
     
    "wxy8u8u" <=?utf-8?B?d3h5OHU4dQ==?=> wrote in message news:3eac5538-7e67-4fca-8c94-0b0a54ecc68b...

    There is a request from our client. That is create a outlook template file using C#, the file will include images & static copy. Then when user opens it thru Outlook( outlook 2007/outlook 2010), only need to type email address, then can send it out. I wanted to search some useful information by GOOGLE, however, I got nothing. Is there anyone working on the Outlook C# programming? If you can tell me component of the ".OFT", then I can make an application thru C# to orgnize relational interface data to create it. Or if you know any programming interface which Microsoft Outlook provides, please feel free to tell me. It would be great if you have any sample codes of C# to create the ".OF" file.

    Any help will be greatly appreciated.

    Thanks in advance.

    Tony


    Ken Slovak MVP - Outlook
    Thursday, February 16, 2012 2:21 PM
    Moderator
  • If all you want is a richly formatted messages with images (but no custom code in the form itself), OFT is nothing but an MSG file with the unsent bit set and all sender information removed.

    How is OFT file supposed to be opened?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!

    Thursday, February 16, 2012 2:48 PM