Hidden Text in Word

J

jojobar

[Background]
We are looking at creating a Word document that can be used as a template
that contains hidden fields. We don't want the user to have any indication
that hiddent text is present. The fixed length hidden field would serve as a
data store that could be read by an AddIn. The hidden field would need to be
capable of storing upto 1 to 2K of ASCII data. The applicable Word versions
would be 2000 and later.

Questions(s)
1. Is there any hidden field(say comments) in Word that is capable of
storing up
to 2K of ASCII data?

2. If so, what is the field/mechanism and is it possible to hide any idication
of the presence of the field from the user?
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?am9qb2Jhcg==?=,
We are looking at creating a Word document that can be used as a template
that contains hidden fields. We don't want the user to have any indication
that hiddent text is present. The fixed length hidden field would serve as a
data store that could be read by an AddIn. The hidden field would need to be
capable of storing upto 1 to 2K of ASCII data. The applicable Word versions
would be 2000 and later.

Questions(s)
1. Is there any hidden field(say comments) in Word that is capable of
storing up
to 2K of ASCII data?
If you don't want to use VSTO, take a look at the VARIABLE object in Word (in
common parlance, a document variable or docvar). This can store large amounts
of text in the document's binary file structure, and is only visible accessible
via the object model or a DocVariable field. But the user would have to know
the name of the docvar in order to display the content in a field.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :)
 
J

jojobar

Peter,

Thanks again for your reply. It is very much appreciated.

Our project has to work with Office 2000. Doesn't this pretty much rule out
a VSTO approach? If so, what do you think that would be the best way to
attach hidden data to a Word 2000 document?
 
J

jojobar

Cindy,

Thank you very much for your reply.

We need an approach that will work with Office versions 2000 and later.Do
you know if a VARIABLE object in can be created and attached to a Word 2000
document?

Thanks


-jojobar
 
J

jojobar

Cindy,

I have found a reference to what you suggested. This looks like it will
work. Thank you so very much for taking your valuable time to reply.
 
P

Peter Huang [MSFT]

Hi

Office 2000 have retired from its mainstream support lifetime.
http://support.microsoft.com/lifecycle/?p1=2484

In additional to Cindy's suggestion. You may try to store the encrypted
string into the Comments document properties. To store the ascii string,
you can use the base64 encoding to encode the encrypted data into
base64string. So that even if the user saw the comments, it is all messy
characters.

But this will need more coding job.
Here is a link for your reference.
http://www.appspro.com/Tips/VBA Tips.htm


Thanks for your efforts!

Best regards,

Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?am9qb2Jhcg==?=,
We need an approach that will work with Office versions 2000 and later.Do
you know if a VARIABLE object in can be created and attached to a Word 2000
document?
For the sake of completeness (and for anyone else who sees this message and
wonders the same thing :)): Document variables are really, old. They go back
to at least Word 6.0, if not earlier. So they're definitely your best bet for
compatibility across multiple versions.

Cindy Meister
 

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