Insert symbol into cell in table

M

Mark

i am trying to insert a symbol in a cell with the following code:

ActiveDocument.Tables(3).Rows(Tables(3).Rows.Count).Cells(2).Select
Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3844, Unicode _
:=True

but it throws up an error -

Run time error 4605
The method or property is not available because the object does not refer to
a simple range or selection.

This routine is called from a cmdbutton on the document.
Can someone please point me in the right direction?

Many thanks
 
H

Helmut Weber

Hi Mark,

like this:

ActiveDocument.Tables(1).Range.Cells(2).Select
Selection.MoveEnd Unit:=wdCharacter, Count:=-1
Selection.InsertSymbol Font:="Wingdings", _
CharacterNumber:=-3844, Unicode:=True
 
M

Mark

Hi Helmet,

Thanks, the table expands with additional rows of data and I need to be able
to put the ticks in the lastrow each time, can you help?
 
H

Helmut Weber

.... just in case you found:

ActiveDocument.Tables(3).Rows(ActiveDocument.Tables(3).Rows.Count).Cells(2).Select

there is also:

ActiveDocument.Tables(3).Rows.Last.Cells(2).Select
 

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