PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > WDPROTECT command
WDPROTECT command

 Removes the protection from the document.

 

Syntax

 

CHGVAR                VAR(&CMD)VALUE('WDPROTECT')

CHGVAR                VAR(&PARM1)VALUE('Password')

CHGVAR                VAR(&PARM2)VALUE(' ')

CALL                  PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

                      &PARM2 &RESULT)

 

 Parameters

 

Parameters

 

Parm1

The password specified to the WPROTECT command.

Parm2

 

 

Example

 

Assuming a Word document has been protected by WPROTECT :

 

  LNCCMD     CMD(WORDOPEN)                                

                                                          

  LNCCMD     CMD(WOPENFILE) PARM1('c:\A\resProtect.docx') 

                                                          

  LNCCMD     CMD(WPROTECT) +                              

               PARM1('Level=wdAllowOnlyComments;PWD="Aura"')

                                                          

  LNCCMD     CMD(WSAVE)                                   

                                                          

  LNCCMD     CMD(WORDCLOSE) PARM1('SAVE=FALSE')           

 

 

To remove the protection, it will be necessary to use the following command:

 

  LNCCMD     CMD(WDPROTECT) PARM1('Aura')     

 

See also

 

WPROTECT