Inserting a ContentControl

D

David Thielen

D

David Thielen

Hi;

Thank you to Condy - I am adding and reading ContentControls. However,
it is inserting my text in a visible part of the document. Is there a
way to put this somewhere I can read/write it but Word/Excel/PPT
basically ignore it?

Also, is there any way to do something like this in Word 2003?

Also, what happens if the file is then saved as an RTF/DOC/XLS/PPT?

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Cindy M.

Hi David,
I am adding and reading ContentControls. However,
it is inserting my text in a visible part of the document. Is there a
way to put this somewhere I can read/write it but Word/Excel/PPT
basically ignore it?
Need to back up a step, here...

We've discussed using CustomXMLParts to store data in the document. A
CustomXMLPart does not need to be linked to a content control - that's
optional.

So, do you *need* the content controls? That would be the simplest way
to not show anything - just don't use a content control.
Also, is there any way to do something like this in Word 2003?

Mmm. I think the only thing would be by embedding custom XML in the
WordProcessingML (and then the file would have to be saved in the XML
file format). Pre-Word 2007 does not support multiple files-within-the
-file (document). I have seen people say they've done this, but I've
only ever used "custom XML" in conjunction with XMLNodes embedded in
the text. I never did twig to how to embed it without displaying an XML
Node...

Beyond that, as you know, document Variables.

Or, if dealing with templates, AutoText entries.

Also, I understand it's possible to write information to Private, Data
or Addin fields (the user can see only the field, not the content you
write to it). But I've never seen any "spec" for how this is done. You
might find that in the "binary file format" (BIFF) information that's
now been made public and is supported in the Forum interface.
http://social.msdn.microsoft.com/Forums/en-US/os_binaryfile/threads

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
T

Tim Li - MSFT

Hi David,

As my understand you are trying to make the text you inserted invisible in
a Document/Workbook/Presentation.

My suggestion is use a custom property to store this text, in the way we
could access this value both in UI and programmatiaclly.Another benefit is
custom property available in both Office 2007 and Office 2003 application,
compare with ContentControl which is only available in Office 2007.

The steps of create custom properties please refer to this link:
http://msdn.microsoft.com/en-us/library/dhxe2d75.aspx

However, the disadvantage of using a custom property is it only stores
plane text, this is a big difference from ContentControls, I'm still
working on finding a way to put the ContentControl in somewhere that won't
effect the rest part of the document, but it seems there's no easy way, it
may need more time.

This reponse just trying to help you out with the problem as soon as
possible, if there's any misunderstand please feel free to tell me. If you
would follow up with more details with this issue it will be much
appreciate.

Best regards,
Tim Li
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 
D

David Thielen

Hi David,

Need to back up a step, here...

We've discussed using CustomXMLParts to store data in the document. A
CustomXMLPart does not need to be linked to a content control - that's
optional.

The more I look at this the more I think it won't work for us -
because a user can take a saved DOCX file and then save it as RTF -
and we need our data to still be saved. I think we're left with
Document.Variables.

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
D

David Thielen

Hi David,

As my understand you are trying to make the text you inserted invisible in
a Document/Workbook/Presentation.

My suggestion is use a custom property to store this text, in the way we
could access this value both in UI and programmatiaclly.Another benefit is
custom property available in both Office 2007 and Office 2003 application,
compare with ContentControl which is only available in Office 2007.

The steps of create custom properties please refer to this link:
http://msdn.microsoft.com/en-us/library/dhxe2d75.aspx

However, the disadvantage of using a custom property is it only stores
plane text, this is a big difference from ContentControls, I'm still
working on finding a way to put the ContentControl in somewhere that won't
effect the rest part of the document, but it seems there's no easy way, it
may need more time.

This reponse just trying to help you out with the problem as soon as
possible, if there's any misunderstand please feel free to tell me. If you
would follow up with more details with this issue it will be much
appreciate.

Custom properties won't work because this data can be several hundred
K. We do uuencode it but it is large. Document.Variables worked great
until the recent service pack but now with Document.Variables broken
for some versions (and still screwy on Vista), we are trying to find
another method.

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Cindy M.

Hi David,
Custom properties won't work because this data can be several hundred
K. We do uuencode it but it is large. Document.Variables worked great
until the recent service pack but now with Document.Variables broken
for some versions (and still screwy on Vista), we are trying to find
another method.

Well, that would leave storing the data externally to the file, with a
reference to that location in the document...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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