0
votes

How can I enable the Hyphenation of a paragraph in a word document using C# and Office Interop?

I found this article...but they are talking about setting the property to boolean values, although the property is a integer. That confuses me.

I tried setting paragraph.Hyphenation to 1, but this resulted in an exception (Value not within range).

Possible values I can set are -1 and 0. Do they represent false (-1) and true (0)?

1

1 Answers

1
votes

For ParagraphFormat.KeepWithNext true is -1 and false is 0. I think this will be consistent across all properties. Better to trial and error.