2

I'm trying to lock all fields in several word documents from refreshing their data upon print, without opening them all and using Ctrl+A, Ctrl+F11. I'm working with Visual Studio Express 2013 making a console c# application using microsoft.office.interop.word to interact with the documents. When I try to lock the fields using doc.Fields.Locked = 1; per the instructions from jJack here I get an error that a value was out of range at the line that should be locking the fields. Everything else seems to be working in my application. I've been unable to find any references to what integers are within range for the Locked property. Does anybody know what values are acceptable?

Community
  • 1
  • 1
Qwelm
  • 33
  • 6

1 Answers1

0

Cindy Meister answered my question here on the MSDN forums. The answer is that -1 is used as the value for true for this property, which is probably based on WordBasic code.

Qwelm
  • 33
  • 6