Word Addin (JS): Insert Caption for a Inline Picture

Raino 1 Reputation point
2021-11-10T17:36:33.117+00:00

Hi there,

Im developing a Word Addin with Javascript and have the following requirement, which was possible with VSTO:

  • I inserted a picture with the insertInlinePictureFromBase64() function, which works
  • How can i insert / set a caption with the javascript api? in VSTO it was possible with a function called InsertCaption()

Thanks for helping!

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,043 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alison McKay 81 Reputation points Microsoft Employee
    2021-11-20T00:53:21.02+00:00

    Hi @Raino , thanks for submitting! The Word JavaScript API doesn't support image captions at this time. But, the Word JavaScript API does support image alt text. The InlinePicture object offers the altTextDescription and altTextTitle properties.

    If you'd like to request support for image captions, we use the Microsoft 365 Developer Platform Ideas system to track feature requests. Please check the existing ideas, and submit yours as a new idea if it's not already on the list. If the community upvotes your idea, it's more likely to be added to the add-ins platform.

    Cheers,
    Alison

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.