Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.tables
Al Al is offline
external usenet poster
 
Posts: 57
Default Insert Paragraph Mark in all Table Cells

I need to have a macro that can insert a Paragraph Mark at the end of every
cell in a table.

I am trying to code this myself from examples but am having no luck

This code offers some hope - I found it from the WordTips site - cycles
through all selected cells but replaces the contents of every cell with
what's in the clipboard, I want to append a Paragraph Mark at the end of the
cell contents.

Sub PasteToCells()
Dim TargetRange As Range
Dim oTargCell As Cell

If Selection.Cells.Count = 0 Then
'Quit if no cells in selection
MsgBox "No cells selected", vbCritical
Exit Sub
End If
On Error Resume Next
Set TargetRange = Selection.Range
For Each oTargCell In Selection.Cells
oTargCell.Range.Paste
Next oTargCell
TargetRange.Select
End Sub

Thank-you
Al



 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
want cells in a table to copy data from cells in another table Conrad D. Farner Tables 2 September 27th 06 04:21 PM
How can I Insert a column into a table that contains split cells Kate Vaughn Tables 1 August 9th 06 05:48 AM
If I insert an Excel table I get a graph, not the cells I specifie Germán Tables 1 July 3rd 06 11:35 AM
Mark at end of paragraph lobolady Microsoft Word Help 2 May 26th 06 05:14 PM
Insert text from one file into the cells of a table in another? Gillmore (ACME SW) Tables 2 November 18th 05 09:49 PM


All times are GMT +1. The time now is 11:27 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"