T
Tisha
ARRRGGGHHHH!!!! Can someone please help me! I've created
a template form and I'm trying to program a macro so that
every time a 2nd or subsequent page is generated,
information from specific cells in a table on the first
page is automatically pasted into the cells of a table in
the 2nd page header (e.g., client, and product
information). In essence, I'm trying to perform a get text
function for text that has yet to be entered (when the
user opens the template and fills in this field
information it should then automatically pop into the
appropriate cells of the 2nd page header table) and it
doesn't seem to be working. Right now my code looks like
this:
ActiveDocument.Unprotect Password:=""
ActiveDocument.Tables(1).Rows(1).Cells(2).Range.Copy
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageHeader
ActiveWindow.ActivePane.View.NextHeaderFooter
Selection.MoveDown Unit:=wdLine, Count:=4
Selection.MoveRight Unit:=wdCell
Set myRange = ActiveDocument.Range _
(Start:=ActiveDocument.Content.Tables(1).Rows
(1).Cells(1), _
End:=ActiveDocument.Content.Tables(1).Rows(1).Cells
(1))
myRange.Paste
ActiveDocument.Protect Password:="", NoReset:=False,
Type:= _
wdAllowOnlyFormFields
End Sub
I know I'm missing something that will make this run
properly, but I can't figure out what it is? How can I
get this to work?
a template form and I'm trying to program a macro so that
every time a 2nd or subsequent page is generated,
information from specific cells in a table on the first
page is automatically pasted into the cells of a table in
the 2nd page header (e.g., client, and product
information). In essence, I'm trying to perform a get text
function for text that has yet to be entered (when the
user opens the template and fills in this field
information it should then automatically pop into the
appropriate cells of the 2nd page header table) and it
doesn't seem to be working. Right now my code looks like
this:
ActiveDocument.Unprotect Password:=""
ActiveDocument.Tables(1).Rows(1).Cells(2).Range.Copy
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageHeader
ActiveWindow.ActivePane.View.NextHeaderFooter
Selection.MoveDown Unit:=wdLine, Count:=4
Selection.MoveRight Unit:=wdCell
Set myRange = ActiveDocument.Range _
(Start:=ActiveDocument.Content.Tables(1).Rows
(1).Cells(1), _
End:=ActiveDocument.Content.Tables(1).Rows(1).Cells
(1))
myRange.Paste
ActiveDocument.Protect Password:="", NoReset:=False,
Type:= _
wdAllowOnlyFormFields
End Sub
I know I'm missing something that will make this run
properly, but I can't figure out what it is? How can I
get this to work?