Sandun Tharaka
Sandun Tharaka

Reputation: 747

How do I insert html after outlook signature using Office-js

I am trying to insert html in to Outlook body. but if there any default signature exist I want to insert after the outlook signature.

Is there any way to get outlook signature? then i can append my html in to it and insert.

Upvotes: 1

Views: 651

Answers (2)

user7823505
user7823505

Reputation:

Office.context.mailbox.item.body.getAsync API returns body with signature. Currently, we don't have API that returns signature only. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered when we go through our planning process.

Upvotes: 0

Eugene Astafiev
Eugene Astafiev

Reputation: 49445

You may try to read the body before setting it Office.context.mailbox.item.body in the code. Office.js doesn't provide any specific property for that.

You can maybe try to use Outlook rest API. You could use now Outlook rest API in easy way from your add in. Read more about it in this link.

FYI The signatures are being kept as separate files in the Signatures folder. You can find this folder in the following location;

  • Windows XP

C:\Documents and Settings\%username%\Application Data\Microsoft\Signatures

  • Windows Vista, Windows 7, Windows 8 and Windows 10

C:\Users\%username%\AppData\Roaming\Microsoft\Signatures

To see this folder you must have “View hidden files and folders” enabled or you can simply copy and paste the above paths in the address bar in Explorer to directly open the folder.

Upvotes: 1

Related Questions