Word Office Add in: Best way to handle editable ranges inside a non editable portion of a Word document?
Hi,
I have an old Word template project written in VBA that was used to insert in the rows of a table in a Word document
- new blocks of document.
- old blocks of document saved on a database (Access)
Each block has some parts that are editable and some that are not. The table in non editable.
1°
I used to solve the problem using Content Controls.
I had:
- the whole table was wrapped by a wdContentControlGroup, with properties:
- LockContentControl = true
- LockContents = true
- LockContentControl = true
- each block had one or more wdContentControlRichText, with properties:
- LockContentControl = true
- LockContents = false
- LockContentControl = true
Every time the user decided to insert a new block the wdContentControlGroup property LockContents was first changed to false and then to true again.
Can I do the same with an Office Word Add-In? There are better way to accomplish the work? There is a way to render non editable ranges of a document?
2°
I used to save each edited block in its own Word file. When the user wanted to insert a specific block, I retrieved the file, the I copied the range and inserted it in the desidered row of the document.
There is another, better way to accomplish this? Can I save only the range block? In which code? How to handle it?
(I'll probably abandon Access because I want the back end of the DB to be both local or on line.)
Thanks for you advice, I'm completely new with the Office Add-Ins technology.
Lauro