Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2004

Tip: Looking for answers? Try searching our database.

Hiding/Protecting Field Codes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 08 Mar 2004 19:48 GMT
I am reposting this because the subject line was
incomplete.  I have an Access 2000 db linked to various
Word documents, which contain both Merge Fields and Word
Logic Fields.  I want to prevent users, after opening a
Word document, from clicking Alt + F9 and viewing the
Word Logic Field Codes.  I'm not overly concerned whether
they can click on the "View Merged Data" button and see
the Merge Field Codes, though it would nice to eliminate
that option also.  I'm aware that if I "protect" the
document, checking the forms box, that user can't view
the Word Logic Field Codes, but this seems to prevent
merger.  Is there a way to prevent users from viewing the
Word Logic Field Codes, without preventing merger?

Please note I'm not very good with VB.

Thank you.

Jim
jvmpdx@att.net
macropod - 09 Mar 2004 08:18 GMT
One way:

After merging, select the whole document (Ctrl-A), then press Ctrl-Shift-F9
to convert the fields to their results. This effectively removes the fields.

Cheers

> I am reposting this because the subject line was
> incomplete.  I have an Access 2000 db linked to various
[quoted text clipped - 16 lines]
> Jim
> jvmpdx@att.net
- 09 Mar 2004 18:01 GMT
Thank you Macropod,

I was aware of the method you outlined for delinking
fields.  I guess I was not clear enough in asking my
question.  In my scenario, I am assuming that a user,
other than myself, has opened the document.  My wish is
to prevent them from clicking Alt + F9 and revealing the
Word Logic Field Codes.  Is there a non-VB solution to
preventing the user from doing so?  The Word doc is
opened via a command button on an Access form.  Perhaps I
need to roll up my sleeves and figure out what needs to
be added to the VB triggered by the command button to not
only open, but merge, save and delink the document.  Am I
warm?

Thanks again.

Jim
>-----Original Message-----
>One way:
[quoted text clipped - 31 lines]
>
>.
- 09 Mar 2004 18:26 GMT
One more piece of information: the command button
triggers a Run App macro containing code as follows:
C:\Program Files\Microsoft
Office\Office\winword.exe  "C:\PBdB11162001\Pleadings
(merge)\VoucherSheets.doc"

Is there code I could add to the macro that would cause
the doc not only to open, but also merge? de-link?

Thanks again.

Jim

>-----Original Message-----
>Thank you Macropod,
[quoted text clipped - 60 lines]
>>
>.
Charles Kenyon - 09 Mar 2004 21:54 GMT
You could intercept the direct command triggered by Alt-F9.

Sub ViewFieldCodes()
'
' ViewFieldCodes Macro
' Shows the field codes or results for all fields (toggle)
'
'    ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes

End Sub

If this macro is in your template or in the document, assuming that security
lets macros run, Alt-F9 will not toggle the viewing of field codes. It also
seems to prevent it from being changed using Tools => Options => View.

A direct vba instruction in the immediate window, though, will still get
around it. I'm sure there are other ways as well.
Signature


Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Thank you Macropod,
>
[quoted text clipped - 57 lines]
> >
> >.
macropod - 10 Mar 2004 11:02 GMT
Hi Charles,

RE: "I'm sure there are other ways as well", not allowing macros to run (eg
by selecting 'disable macros' or holding down the shift key while the
document loads) will also allow the field codes to be viewed.

Cheers

> You could intercept the direct command triggered by Alt-F9.
>
[quoted text clipped - 74 lines]
> > >
> > >.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.