vkumar2 0 Newbie Poster

Hi ,

This is vinod , iam just trying to write vbscript to protect document as well as select editting restrictions as filling in forms,
i tried a lot , i can only protect the document but i could not select editting restrictions to allow users only fill in forms, please help me how can i do this ?

Code :-
Dim dataDocLocation, msWord, msWordDoc, oTransports
Dim oError, oErrorD
Dim oDescription

dataDocLocation = "E:\outlookforms\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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.