Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Copy text automatically from one cell in a table to another one
Hi all,
In a Word document of mine I have three tables with two cells in each. When the user writes something in the left cell of the uppermost table I want a VBA script, or another function, to copy the text to the left cell of the lowermost table. Can you imagine how I do this? If you have an enlightening comment for me, please let me know. Thank you very much in advance. Jo |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Copy text automatically from one cell in a table to another one
Hi all,
I forgot to write that we are using Word 2003 ... Jo Jo Gjessing skrev: Hi all, In a Word document of mine I have three tables with two cells in each. When the user writes something in the left cell of the uppermost table I want a VBA script, or another function, to copy the text to the left cell of the lowermost table. Can you imagine how I do this? If you have an enlightening comment for me, please let me know. Thank you very much in advance. Jo |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Copy text automatically from one cell in a table to another one
The following macro will copy the first cell of table 1 to the first cell of
table 3 Sub DuplicateCell1() Dim oRng As Range With ActiveDocument Set oRng = .Tables(1).Cell(1, 1).Range oRng.End = oRng.End - 1 .Tables(3).Cell(1, 1).Range.Text = oRng End With End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jo Gjessing wrote: Hi all, In a Word document of mine I have three tables with two cells in each. When the user writes something in the left cell of the uppermost table I want a VBA script, or another function, to copy the text to the left cell of the lowermost table. Can you imagine how I do this? If you have an enlightening comment for me, please let me know. Thank you very much in advance. Jo |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Copy text automatically from one cell in a table to another one
Hi, Graham.
Thank you for responding so quickly. I've now inserted another table in my document so I changed ..Tables(3).Cell(1, 1).Range.Text = oRng to ..Tables(4).Cell(1, 1).Range.Text = oRng Also I renamed your script from Sub DuplicateCell1() to Sub DuplicateCell1_BeforePrint () to connect it to the BeforePrint event. I'm not able, however, to make it work. Can that be because I now have two macros connected to the BeforePrint in the same document? Hoping to hearing from you again. Jo Jo Gjessing skrev: Hi all, In a Word document of mine I have three tables with two cells in each. When the user writes something in the left cell of the uppermost table I want a VBA script, or another function, to copy the text to the left cell of the lowermost table. Can you imagine how I do this? If you have an enlightening comment for me, please let me know. Thank you very much in advance. Jo |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can one automatically shrink text to fit within a fixed-size table cell, text box or frame? | New Users | |||
How to copy table cell shading to another cell in Word? | Tables | |||
Copy text from word document to cell of a table | Tables | |||
How do I copy cell data automatically | Page Layout | |||
How do I auto copy data from cell in a word table to another cell. | New Users |