>I would like to know if the following is possible and if so how?
>
>1. If the file is opened read/only (i.e. from Visual Foxpro 9) disable all items in the file menu except Page Setup for Printing, Print, and exit.
>
>2. Only allow specific users to be able to modify the file and save it (based on user login id)?
Helle Claude,
per your #1:
From VFP9 you can control the behavior of Word commandBArs, like:
oword=createobject("Word.Application")
oword.CommandBars("Menu Bar").Controls("Edit").enabled=.f.
oword.CommandBars("Menu Bar").Controls("File").controls(1).enabled=.f.
etc..
But it will set this behavior on the global level, and not temporaraly, and not for particular document, so you need to recall all original settings upon closing the document.
per your #2:
Do you wish to control the behavior while opening the document for user in VFP, or from Word? If it is for particular file then anyway you can add AUtoOpen and AutoClose macros, where you need to check for user id, and set pernissions, enabled/enabled, etc depending on it.
Probably you may also apply another approach based on the password requered for opening the document in particular mode, and give the password to particular users only.
Good Luck
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only