Hi ,
This is vinod , i was just trying to write a vbscript to protect a word document and as well as select Editting restrictions as filling in forms, but i could only protect the form but not able to select editting restrcitions, I am just breaking my head to do this ,can you please help me and solution for this will appreciated.
Mycode :-
Dim dataDocLocation, msWord, msWordDoc, oTransports
Dim oError, oErrorD
Dim oDescription
dataDocLocation = "E:\PPR CR Sign off form4.doc"
Set msWord = CreateObject("Word.Application")
Set msWordDoc = msWord.Documents.Open(dataDocLocation)
Set msWordDoc = msWord.ActiveDocument
msWordDoc.Unprotect "prodapp"
msWordDoc.Tables(3).Cell(2,1).Range.Text= "descrtiption"
msWordDoc.Tables(6).Cell(3,3).Range.Text = "123 123123" msWordDoc.Protect wdNoProtection,False,"prodapp",False,True
msWord.Application.Visible = True
This is vinod , i was just trying to write a vbscript to protect a word document and as well as select Editting restrictions as filling in forms, but i could only protect the form but not able to select editting restrcitions, I am just breaking my head to do this ,can you please help me and solution for this will appreciated.
Mycode :-
Dim dataDocLocation, msWord, msWordDoc, oTransports
Dim oError, oErrorD
Dim oDescription
dataDocLocation = "E:\PPR CR Sign off form4.doc"
Set msWord = CreateObject("Word.Application")
Set msWordDoc = msWord.Documents.Open(dataDocLocation)
Set msWordDoc = msWord.ActiveDocument
msWordDoc.Unprotect "prodapp"
msWordDoc.Tables(3).Cell(2,1).Range.Text= "descrtiption"
msWordDoc.Tables(6).Cell(3,3).Range.Text = "123 123123" msWordDoc.Protect wdNoProtection,False,"prodapp",False,True
msWord.Application.Visible = True