Word 2007: ContentControl's method ToggleEditPlaceholderText is mi

S

Software_Developer

Hello.

In Word Object Model there is a missed method ToggleEditPlaceholderText of
ContentControl object.

Method description: Switches the state between editing the placeholder text
for a content control and saving the placeholder text, and returns a Long
that represents the state.

Please see Word Help or MSDN
http://msdn.microsoft.com/en-us/library/bb256833.aspx

But this method really does not exist!!! It is not recognised by VBA editor.
Also OLE/COM Object Viewer proofs that there is no such method in Word 12.0
Object Library!!!

Please help.
Thanks.
 
J

Jay Freedman

I don't know what sort of "help" you're expecting. Clearly the documentation
is wrong, either because the method was never implemented or because it was
withdrawn. In any case, it seems unnecessary; use the SetPlaceholderText
method to make whatever changes you need.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
S

Software_Developer

The problem is that there is no way to turn off placeholders.

If I use method SetPlaceholderText with empty string, it becomes impossible
to turn on/off Design Mode, because the following message appears:

"Word cannot turn off design mode because placeholder text in a content
control contains invalid items. Placeholder text cannot contain items such as
floating objects, revision marks, or content controls. Remove these items
from the placeholder text and try again."

And when placeholder text is not empty, it is impossible to set Content
Control's value. For example, Controls of type wdContentControlRichText don't
support XML mapping, and I use control's Range to set value but receive an
error. Also when I try to get control's value, I would like to retrieve its
real value from the range but not placeholder.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top