If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I lock a table cell in Word?
I am creating a template in Word using tables. I want to lock certain cells
so no one can alter the contents. |
#2
|
|||
|
|||
How do I lock a table cell in Word?
Hi =?Utf-8?B?S2F0aHJ5biBQdW5kdA==?=,
I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. Which version of Word do you have? Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#3
|
|||
|
|||
How do I lock a table cell in Word?
Hi Kathryn:
Ok- this should do it for you... 1. Manual Method- - right click on the textbox - select Properties - uncheck "Fill-in enabled" 2. Programmatic Method- (in this example, you add 2 fields, each into a cell in your table, but disabling the second field) Dim rownum As Integer, i As Integer response = MsgBox("Add new row?", vbQuestion + vbYesNo) If response = vbYes Then ActiveDocument.Unprotect ActiveDocument.Tables(1).Rows.Add rownum = ActiveDocument.Tables(1).Rows.Count For i = 1 To ActiveDocument.Tables(1).Columns.Count ActiveDocument.FormFields.Add Range:=ActiveDocument.Tables(1).Cell(rownum, i).Range, Type:=wdFieldFormTextInput Next i ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count - 1).Range.FormFields(1).EntryMacro = "addinfo" ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).ExitMacro = "addrow" ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).Enabled = False 'ActiveDocument.Tables(1).Cell(ActiveDocument.Tabl es(1).Rows.Count, 1).Range.FormFields(1).Select ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True End If Cheers, Al "Kathryn Pundt" wrote: I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. |
#4
|
|||
|
|||
How do I lock a table cell in Word?
Word 2003 (11...)
"Cindy M." wrote: Hi =?Utf-8?B?S2F0aHJ5biBQdW5kdA==?=, I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. Which version of Word do you have? Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#5
|
|||
|
|||
How do I lock a table cell in Word?
Tables (not textbox) doesn't appear to have the capability.
I am using Word 2003 (11....) "alborg" wrote: Hi Kathryn: Ok- this should do it for you... 1. Manual Method- - right click on the textbox - select Properties - uncheck "Fill-in enabled" 2. Programmatic Method- (in this example, you add 2 fields, each into a cell in your table, but disabling the second field) Dim rownum As Integer, i As Integer response = MsgBox("Add new row?", vbQuestion + vbYesNo) If response = vbYes Then ActiveDocument.Unprotect ActiveDocument.Tables(1).Rows.Add rownum = ActiveDocument.Tables(1).Rows.Count For i = 1 To ActiveDocument.Tables(1).Columns.Count ActiveDocument.FormFields.Add Range:=ActiveDocument.Tables(1).Cell(rownum, i).Range, Type:=wdFieldFormTextInput Next i ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count - 1).Range.FormFields(1).EntryMacro = "addinfo" ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).ExitMacro = "addrow" ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).Enabled = False 'ActiveDocument.Tables(1).Cell(ActiveDocument.Tabl es(1).Rows.Count, 1).Range.FormFields(1).Select ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True End If Cheers, Al "Kathryn Pundt" wrote: I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. |
#6
|
|||
|
|||
How do I lock a table cell in Word?
I know- that's the whole point of locking the document, thus forcing the use
of textboxes. If you place a textbox inside a cell, you can lock THAT as depicted! Cheers, Al "Kathryn Pundt" wrote: Tables (not textbox) doesn't appear to have the capability. I am using Word 2003 (11....) "alborg" wrote: Hi Kathryn: Ok- this should do it for you... 1. Manual Method- - right click on the textbox - select Properties - uncheck "Fill-in enabled" 2. Programmatic Method- (in this example, you add 2 fields, each into a cell in your table, but disabling the second field) Dim rownum As Integer, i As Integer response = MsgBox("Add new row?", vbQuestion + vbYesNo) If response = vbYes Then ActiveDocument.Unprotect ActiveDocument.Tables(1).Rows.Add rownum = ActiveDocument.Tables(1).Rows.Count For i = 1 To ActiveDocument.Tables(1).Columns.Count ActiveDocument.FormFields.Add Range:=ActiveDocument.Tables(1).Cell(rownum, i).Range, Type:=wdFieldFormTextInput Next i ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count - 1).Range.FormFields(1).EntryMacro = "addinfo" ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).ExitMacro = "addrow" ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).Enabled = False 'ActiveDocument.Tables(1).Cell(ActiveDocument.Tabl es(1).Rows.Count, 1).Range.FormFields(1).Select ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True End If Cheers, Al "Kathryn Pundt" wrote: I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. |
#7
|
|||
|
|||
How do I lock a table cell in Word?
I'm am not sure I understand. This is what I understand you are trying to
convey. Create a table. Insert textboxes into the table? Then, lock the texbox? "Kathryn Pundt" wrote: I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. |
#8
|
|||
|
|||
How do I lock a table cell in Word?
Hi Kathryn:
Yup... that's it. You gotta "lock" (i.e. disable) the textbox controls, not the table. BTW, the idea on how to programmatically add new rows with textboxes was obtained from one of the most popular threads (check Show- Helpful threads) with the title "Subject: How to insert multiple rows in tables". It really is cool. The way I did it is the slightly improved version that works in Word 2000/2002/2003 since the textbox "name" method didn't work in the MS Word 2000 due to a Word bug. Cheers, AL "Kathryn Pundt" wrote: I'm am not sure I understand. This is what I understand you are trying to convey. Create a table. Insert textboxes into the table? Then, lock the texbox? "Kathryn Pundt" wrote: I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. |
#9
|
|||
|
|||
How do I lock a table cell in Word?
Okay, I'll let you know how it goes.
As for the "how to programmatically add new rows with textboxes " instructions, I don't know how to use user-programming. But, am very willing to learn if you have the time... "alborg" wrote: Hi Kathryn: Yup... that's it. You gotta "lock" (i.e. disable) the textbox controls, not the table. BTW, the idea on how to programmatically add new rows with textboxes was obtained from one of the most popular threads (check Show- Helpful threads) with the title "Subject: How to insert multiple rows in tables". It really is cool. The way I did it is the slightly improved version that works in Word 2000/2002/2003 since the textbox "name" method didn't work in the MS Word 2000 due to a Word bug. Cheers, AL "Kathryn Pundt" wrote: I'm am not sure I understand. This is what I understand you are trying to convey. Create a table. Insert textboxes into the table? Then, lock the texbox? "Kathryn Pundt" wrote: I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. |
#10
|
|||
|
|||
How do I lock a table cell in Word?
Hi Kathryn:
Begin by looking at how the end result works- download the applet that I use to follow patients in the hospital from- http://www.emrupdate.com/files/folde...ntry67024.aspx Tonight I'll guide you through how to add in the new textfields- not all that hard. Cheers, Al "Kathryn Pundt" wrote: Okay, I'll let you know how it goes. As for the "how to programmatically add new rows with textboxes " instructions, I don't know how to use user-programming. But, am very willing to learn if you have the time... "alborg" wrote: Hi Kathryn: Yup... that's it. You gotta "lock" (i.e. disable) the textbox controls, not the table. BTW, the idea on how to programmatically add new rows with textboxes was obtained from one of the most popular threads (check Show- Helpful threads) with the title "Subject: How to insert multiple rows in tables". It really is cool. The way I did it is the slightly improved version that works in Word 2000/2002/2003 since the textbox "name" method didn't work in the MS Word 2000 due to a Word bug. Cheers, AL "Kathryn Pundt" wrote: I'm am not sure I understand. This is what I understand you are trying to convey. Create a table. Insert textboxes into the table? Then, lock the texbox? "Kathryn Pundt" wrote: I am creating a template in Word using tables. I want to lock certain cells so no one can alter the contents. |
|
Thread Tools | |
Display Modes | |
|
|