The tag Office Open Specifications is dedicated to supporting issues related to open specifications. You can find open specifications here https://learn.microsoft.com/en-us/openspecs/
You inquiry is not related to open specifications. You may want to post your inquiry to stack overflow at the following link
Also there are samples at the following locations that you may find useful
I have removed the Office Open Specifications tag from your post.
Obaid Farooqi - MSFT