From: Stanley on 23 Mar 2010 10:43 I have a protected .dot file that I am programming from MS Access 2002. In my code I unprotect the document and then I can update fields that I set as bookmarks. My problems are: a) I can't protect the documents again (objword.ActiveDocument.protect gives me an error--the document is not open b) I can't show the document on the screen c) I don't know how to save the document with a given name Let me tell you what I am trying to do. I want to have a number to protected forms with bookmarks (filled in programatically) and fields and controls for user entry. After I fill the bookmarked fields, I want the user to see the form and fill in the rest of it. Then I want to save the document with a programmed name in a specific folder. Thanks, Stanley
From: Doug Robbins - Word MVP on 23 Mar 2010 17:28 Instead of bookmarks, use docvariable fields and have your Access routine set the value of corresponding variables in the document and update the fields in the document so that the values of the variables are displayed in the docvariable fields. It is not then necessary to unprotect the document. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Stanley" <Stanley(a)discussions.microsoft.com> wrote in message news:88E35033-8385-4353-93E7-EC825453694F(a)microsoft.com... > I have a protected .dot file that I am programming from MS Access 2002. > In my code I unprotect the document and then I can update fields that I > set > as bookmarks. > My problems are: > a) I can't protect the documents again (objword.ActiveDocument.protect > gives > me an error--the document is not open > b) I can't show the document on the screen > c) I don't know how to save the document with a given name > > Let me tell you what I am trying to do. > I want to have a number to protected forms with bookmarks (filled in > programatically) and fields and controls for user entry. > > After I fill the bookmarked fields, I want the user to see the form and > fill > in the rest of it. > > Then I want to save the document with a programmed name in a specific > folder. > > Thanks, > Stanley > > > >
|
Pages: 1 Prev: Hiding format tabs in Word 2007 Next: In XL VBA, Word Document SaveAs throws error |