Table manipulations

S

Shell

I have managed to copy cells from one table to another table in VBA.
But
1. In the destination table/cell how do I make bold just some of the text
in the cell?

2. How do I copy pictures from one cell to another cell? The destination
cell is in a different table in the same document.

Thanks
 
J

Jean-Guy Marcil

Shell was telling us:
Shell nous racontait que :
I have managed to copy cells from one table to another table in VBA.

What code are you using?
But
1. In the destination table/cell how do I make bold just some of
the text in the cell?

2. How do I copy pictures from one cell to another cell? The
destination cell is in a different table in the same document.

Are you copying a cell so that the target table gets a new cell or are you
copying the content of one cell to another cell in a different table (so
that no new cells are added to the target table)?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
S

Shell

I am copying the content of one cell to another cell in a different table (so
that no new cells are added to the target table)?
 
J

Jean-Guy Marcil

Shell was telling us:
Shell nous racontait que :
I am copying the content of one cell to another cell in a different
table (so that no new cells are added to the target table)?

This code will copy the content and format of the cell located in the first
row and second column of the first table in the document to the cell located
in the third row and fourth column of the second table in the document.


Dim rgeCellSource As Range

With ActiveDocument
Set rgeCellSource = .Tables(1).Cell(1, 2).Range
'Remove the cell marker form the range or the format of
'the table where the range is copied will be disturbed.
rgeCellSource.MoveEnd wdCharacter, -1
.Tables(2).Cell(3, 4).Range.FormattedText = _
rgeCellSource
End With


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top