Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. how to get default signature in outlook using Javascript

how to get default signature in outlook using Javascript

Scheduled Pinned Locked Moved JavaScript
javascriptcomhelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anurag Sinha V
    wrote on last edited by
    #1

    Hi All, Have a code which sends an Outlook mail using Javascript by creating an instance of ActiveX object. I need the functionality to be such, when the user executes this code his default signature should also be added in the mail...Have tried it but to no avail..Any help would be highly appreciated... The code goes as follows for the reference:

    function mailWindowOpen(mailBody) {
    outlookApp = new ActiveXObject("Outlook.Application");
    var nameSpace = outlookApp.getNameSpace("MAPI");
    mailFolder = nameSpace.getDefaultFolder(6);
    mailItem = mailFolder.Items.add('IPM.Note.FormA');
    mailItem.Subject = "Hi There!!!";
    mailItem.HTMLBody = mailBody;

     mailItem.display(0);
    

    }

    mailBody is passed as a parameter from an aspx page, which has the Page.ClientScript.RegisterStartScript command to call this Javascript function...

    -Anurag

    P B 2 Replies Last reply
    0
    • A Anurag Sinha V

      Hi All, Have a code which sends an Outlook mail using Javascript by creating an instance of ActiveX object. I need the functionality to be such, when the user executes this code his default signature should also be added in the mail...Have tried it but to no avail..Any help would be highly appreciated... The code goes as follows for the reference:

      function mailWindowOpen(mailBody) {
      outlookApp = new ActiveXObject("Outlook.Application");
      var nameSpace = outlookApp.getNameSpace("MAPI");
      mailFolder = nameSpace.getDefaultFolder(6);
      mailItem = mailFolder.Items.add('IPM.Note.FormA');
      mailItem.Subject = "Hi There!!!";
      mailItem.HTMLBody = mailBody;

       mailItem.display(0);
      

      }

      mailBody is passed as a parameter from an aspx page, which has the Page.ClientScript.RegisterStartScript command to call this Javascript function...

      -Anurag

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      There is a suggestion that calling GetInspector() on the mailItem will populate the signature. I've never tried it in JavaScript, but it may work for you. I found more details in this[^] blog posting.

      *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

      "Mind bleach! Send me mind bleach!" - Nagy Vilmos

      CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

      1 Reply Last reply
      0
      • A Anurag Sinha V

        Hi All, Have a code which sends an Outlook mail using Javascript by creating an instance of ActiveX object. I need the functionality to be such, when the user executes this code his default signature should also be added in the mail...Have tried it but to no avail..Any help would be highly appreciated... The code goes as follows for the reference:

        function mailWindowOpen(mailBody) {
        outlookApp = new ActiveXObject("Outlook.Application");
        var nameSpace = outlookApp.getNameSpace("MAPI");
        mailFolder = nameSpace.getDefaultFolder(6);
        mailItem = mailFolder.Items.add('IPM.Note.FormA');
        mailItem.Subject = "Hi There!!!";
        mailItem.HTMLBody = mailBody;

         mailItem.display(0);
        

        }

        mailBody is passed as a parameter from an aspx page, which has the Page.ClientScript.RegisterStartScript command to call this Javascript function...

        -Anurag

        B Offline
        B Offline
        BobJanova
        wrote on last edited by
        #3

        This isn't really a JS question. You need to look at Outlook's API documentation, I think.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups