Phil,
The short answer is, you can't - at least not without doing a lot of work to
try to replicate what Word does natively, and even then I doubt you would be
satisfied with the result.
There is no way to unprotect just a single cell in a table. You might be
able to "fake it" by placing the cell you want to work with in a row by
itself and then putting continuous section breaks before and after the row.
Then you could just make that section unprotected. This wouldn't require any
programming, as it's something that Word supports out of the box.
The problem with a programmatic approach is that it would be very difficult
to specify exactly which cell you want to manipulate and then restrict
functionality to that cell only. You can't just write some (simple) code to
unprotect the document, insert an image, and then reprotect it again. This is
because you can't put the cursor into the cell (as you well know), so it's
nearly impossible to specify the "insertion point" for the image.
I've face a similar problem with trying to provide functionality for users
to manipulate the images in a protected document. When a document is
protected, the users cannot even select an image, so trying to do things like
position the image on the page or resize it (or even delete it) is
impossible. My less-than-adequate solution is to display a userform with a
list of the images for the user to select from and then invoke the native
Word 'Format Picture' dialog. Of course this doesn't work very well because:
1) Word tells you bugger-all about pictures so it's hard to tell which image
to select; and 2) it's a lot harder to position an image using the 'Format
Picture' dialog than it is using the arrow keys; usually multiple attempts
are required.
The only possible solution I can think of to your particular problem is to
do something similar with a table: display a "list" of the cells in the table
and have the user select the cell they want to put the image in. Even worse
than my image formatting solution above, IMHO.
You might be able to do something like insert a formfield into the cell (so
the users can at least put the cursor into the cell) and then replace the
formfield with the image, but even this has its limitations. You would
struggle to limit the functionality only to a particular cell or cells; the
functionality would work in any cell with a formfield in it. You also
wouldn't be able to work with the image or the cell after it was inserted, as
the cell would then be locked again.
So in short, what you're asking for cannot be done - at least not easily and
not in a way that would be acceptable to most users. My solution to this
would be to "fake it" as I described above.
--
Cheers!
Gordon
The Kiwi Koder
Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.