Adarsh
Adarsh

Reputation: 25

c# code to set cursor position in outlook word editor

I am working with a outlook add-in for HTML content email in C#, I need to set the caret position inside a div to allow user to type when clicking new mail.

Is there any option using GetInspector.WordEditor to set the cursor position to star typing the email content

Upvotes: 1

Views: 1012

Answers (1)

Eric Legault
Eric Legault

Reputation: 5834

Absolutely - just use:

 wordApplication.Selection.Start = 1000

 wordApplication.Selection.End = 1000

Where wordApplication is a Word.Application object returned from Word.Document.Application, and Word.Document is returned from Inspector.WordEditor.

Upvotes: 2

Related Questions