Hello,

I have a vba application for word, in which it is nesessary to put
information (=text) in the document which is unvisible for the user. Is
there any property were this can be done?
thanks Peter

Re: Unvisible Text / property by Doug

Doug
Sat Jul 31 21:11:25 CDT 2004

Hi Peter,

The following will insert some text and format the font as hidden

Dim myrange As Range
Set myrange = Selection.Range
myrange.Text = "Some Text"
myrange.Font.Hidden = True

The user can easily see it however if they turn on the display of hidden
text. Using a DocumentVariable would allow you to save some text with the
document so that:

You could later retrieve if by

Using VBA
Inserting a DocVariable field

Even then however, all that the user would have to do is run the following
code to learn what the text is:

Dim avar As Variable
For Each avar In ActiveDocument.Variables
MsgBox avar.Value
Next avar

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Peter Lingo" <peter.lingo@tiscali.de> wrote in message
news:ceh8m6$j38$1@online.de...
> Hello,
>
> I have a vba application for word, in which it is nesessary to put
> information (=text) in the document which is unvisible for the user. Is
> there any property were this can be done?
> thanks Peter
>
>



Re: Unvisible Text / property by Stan

Stan
Sat Jul 31 20:53:50 CDT 2004

Yes. If you do it from the document itself, you select the text, click
Format and then check the "Hidden" checkbox on the dialog. If you do it
from code, use Selection.Font.Hidden = True


"Peter Lingo" <peter.lingo@tiscali.de> wrote in message
news:ceh8m6$j38$1@online.de...
> Hello,
>
> I have a vba application for word, in which it is nesessary to put
> information (=text) in the document which is unvisible for the user. Is
> there any property were this can be done?
> thanks Peter
>
>



Re: Unvisible Text / property by peter

peter
Mon Aug 02 09:18:56 CDT 2004

"Stan Scott" <stanss@bellatlantic.net> wrote in message news:<O0#OeG5dEHA.724@TK2MSFTNGP10.phx.gbl>...
> Yes. If you do it from the document itself, you select the text, click
> Format and then check the "Hidden" checkbox on the dialog. If you do it
> from code, use Selection.Font.Hidden = True
>
>
> "Peter Lingo" <peter.lingo@tiscali.de> wrote in message
> news:ceh8m6$j38$1@online.de...
> > Hello,
> >
> > I have a vba application for word, in which it is nesessary to put
> > information (=text) in the document which is unvisible for the user. Is
> > there any property were this can be done?
> > thanks Peter
> >
> >

Can it make be sure that the user can't made the hidden text visible?
Even when the rest of document is editable completly
(format/content...)?

Thanks Peter

Re: Unvisible Text / property by Doug

Doug
Mon Aug 02 10:34:13 CDT 2004

If it's in the document, the user can read it.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Stan Scott" <stanss@bellatlantic.net> wrote in message
news:O0%23OeG5dEHA.724@TK2MSFTNGP10.phx.gbl...
> Yes. If you do it from the document itself, you select the text, click
> Format and then check the "Hidden" checkbox on the dialog. If you do it
> from code, use Selection.Font.Hidden = True
>
>
> "Peter Lingo" <peter.lingo@tiscali.de> wrote in message
> news:ceh8m6$j38$1@online.de...
>> Hello,
>>
>> I have a vba application for word, in which it is nesessary to put
>> information (=text) in the document which is unvisible for the user. Is
>> there any property were this can be done?
>> thanks Peter
>>
>>
>
>



Re: Unvisible Text / property by Chad

Chad
Mon Aug 02 11:41:48 CDT 2004

If you store the information in document variables, it will be accessible to
users but the average user doesn't know what they are or how to access them.
They can only be read by inserting a DOCVARIABLE field in the document or
using VBA.

Regards,
Chad


"Peter Lingo" <peter.lingo@tiscali.de> wrote in message
news:ceh8m6$j38$1@online.de...
> Hello,
>
> I have a vba application for word, in which it is nesessary to put
> information (=text) in the document which is unvisible for the user. Is
> there any property were this can be done?
> thanks Peter
>
>



Re: Unvisible Text / property by peter

peter
Tue Aug 03 13:46:06 CDT 2004

"Chad DeMeyer" <cjdemeye at bechtel dot com> wrote in message news:<e82cc#KeEHA.1692@tk2msftngp13.phx.gbl>...
> If you store the information in document variables, it will be accessible to
> users but the average user doesn't know what they are or how to access them.
> They can only be read by inserting a DOCVARIABLE field in the document or
> using VBA.
>
> Regards,
> Chad
>
>
> "Peter Lingo" <peter.lingo@tiscali.de> wrote in message
> news:ceh8m6$j38$1@online.de...
> > Hello,
> >
> > I have a vba application for word, in which it is nesessary to put
> > information (=text) in the document which is unvisible for the user. Is
> > there any property were this can be done?
> > thanks Peter
> >

Thanks for the suggestions, DOCVARIABLE works like I want

Peter
> >

Re: Unvisible Text / property by Chad

Chad
Tue Aug 03 16:50:34 CDT 2004

Glad to be of assistance
Regards,
Chad


"Peter" <peter.lingo@tiscali.de> wrote in message
news:d7d5ed9f.0408031046.4390c369@posting.google.com...
> "Chad DeMeyer" <cjdemeye at bechtel dot com> wrote in message
news:<e82cc#KeEHA.1692@tk2msftngp13.phx.gbl>...
> > If you store the information in document variables, it will be
accessible to
> > users but the average user doesn't know what they are or how to access
them.
> > They can only be read by inserting a DOCVARIABLE field in the document
or
> > using VBA.
> >
> > Regards,
> > Chad
> >
> >
> > "Peter Lingo" <peter.lingo@tiscali.de> wrote in message
> > news:ceh8m6$j38$1@online.de...
> > > Hello,
> > >
> > > I have a vba application for word, in which it is nesessary to put
> > > information (=text) in the document which is unvisible for the user.
Is
> > > there any property were this can be done?
> > > thanks Peter
> > >
>
> Thanks for the suggestions, DOCVARIABLE works like I want
>
> Peter
> > >



Re: Unvisible Text / property by peter

peter
Sun Aug 08 17:01:57 CDT 2004

"Chad DeMeyer" <cjdemeye at bechtel dot com> wrote in message news:<uhEpoPaeEHA.2544@TK2MSFTNGP10.phx.gbl>...
> Glad to be of assistance
> Regards,
> Chad
>
>
> "Peter" <peter.lingo@tiscali.de> wrote in message
> news:d7d5ed9f.0408031046.4390c369@posting.google.com...
> > "Chad DeMeyer" <cjdemeye at bechtel dot com> wrote in message
> news:<e82cc#KeEHA.1692@tk2msftngp13.phx.gbl>...
> > > If you store the information in document variables, it will be
> accessible to
> > > users but the average user doesn't know what they are or how to access
> them.
> > > They can only be read by inserting a DOCVARIABLE field in the document
> or
> > > using VBA.
> > >
> > > Regards,
> > > Chad
> > >
> > >
> > > "Peter Lingo" <peter.lingo@tiscali.de> wrote in message
> > > news:ceh8m6$j38$1@online.de...
> > > > Hello,
> > > >
> > > > I have a vba application for word, in which it is nesessary to put
> > > > information (=text) in the document which is unvisible for the user.
> Is
> > > > there any property were this can be done?
> > > > thanks Peter
> > > >
> >
> > Thanks for the suggestions, DOCVARIABLE works like I want
> >
> > Peter
> > > >

one further quetions

there is the method activedocument.variables.add
but why is not the activedocument.variables.remove method available?

thanks Peter

Re: Unvisible Text / property by Jay

Jay
Sun Aug 08 21:27:28 CDT 2004

peter.lingo@tiscali.de (Peter) wrote:
>
>one further quetions
>
>there is the method activedocument.variables.add
>but why is not the activedocument.variables.remove method available?
>
>thanks Peter

The folks who wrote the architecture of VBA decided that collections
don't have a .Remove method. Instead, the objects in the collection
have a .Delete method. Thus, you would call

ActiveDocument.Variables("myVar").Delete

to remove the variable named myVar.

Of course, nothing in MS software is completely logical, so there are
exceptions: the Controls, Pages, and Tabs collections do have a
.Remove method. <shrug>

--
Regards,
Jay Freedman http://aspnet2.com/mvp.ashx?JayFreedman
Microsoft Word MVP FAQ: http://word.mvps.org