A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Quickest method (from user’s perspective) of populating a table



 
 
Thread Tools Display Modes
  #1  
Old December 28th, 2007, 02:35 PM posted to microsoft.public.word.tables
ashwin
external usenet poster
 
Posts: 10
Default Quickest method (from user’s perspective) of populating a table

I have a table with one hundred rows.

What is the quickest way to populate all one hundred rows?


--
ashwin
  #2  
Old December 28th, 2007, 02:49 PM posted to microsoft.public.word.tables
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Quickest method (from user's perspective) of populating a table

Populate them with what?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


ashwin wrote:
I have a table with one hundred rows.

What is the quickest way to populate all one hundred rows?



  #3  
Old December 28th, 2007, 02:53 PM posted to microsoft.public.word.tables
Greg Maxey
external usenet poster
 
Posts: 290
Default Quickest method (from user's perspective) of populating a table

Populated with what?

If you just want to put some text in each cell then you could run a macro.
This may not be the "quickest" but its pretty fast and it would number each
table cell with a sequential number:

Sub ScratchmMacro()
Dim oCell As Cell
Dim i As Long
Set oCell = Selection.Tables(1).Cell(1, 1)
i = 0
Do
i = i + 1
oCell.Range.Text = i & "."
Set oCell = oCell.Next
Loop Until oCell Is Nothing
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

"ashwin" wrote in message
...
I have a table with one hundred rows.

What is the quickest way to populate all one hundred rows?


--
ashwin



  #4  
Old December 28th, 2007, 02:57 PM posted to microsoft.public.word.tables
ashwin
external usenet poster
 
Posts: 10
Default Quickest method (from user's perspective) of populating a tabl

Text
--
ashwin


"Graham Mayor" wrote:

Populate them with what?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


ashwin wrote:
I have a table with one hundred rows.

What is the quickest way to populate all one hundred rows?




  #5  
Old December 28th, 2007, 02:58 PM posted to microsoft.public.word.tables
ashwin
external usenet poster
 
Posts: 10
Default Quickest method (from user's perspective) of populating a tabl

I'd like to populate the rows programmatically with text.
--
ashwin


"Graham Mayor" wrote:

Populate them with what?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


ashwin wrote:
I have a table with one hundred rows.

What is the quickest way to populate all one hundred rows?




  #6  
Old December 28th, 2007, 03:07 PM posted to microsoft.public.word.tables
ashwin
external usenet poster
 
Posts: 10
Default Quickest method (from user's perspective) of populating a tabl

I understand that I can update the contents of each cell individually, but is
there something faster like Pasting or setting a range to an array?

--
ashwin


"Greg Maxey" wrote:

Populated with what?

If you just want to put some text in each cell then you could run a macro.
This may not be the "quickest" but its pretty fast and it would number each
table cell with a sequential number:

Sub ScratchmMacro()
Dim oCell As Cell
Dim i As Long
Set oCell = Selection.Tables(1).Cell(1, 1)
i = 0
Do
i = i + 1
oCell.Range.Text = i & "."
Set oCell = oCell.Next
Loop Until oCell Is Nothing
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

"ashwin" wrote in message
...
I have a table with one hundred rows.

What is the quickest way to populate all one hundred rows?


--
ashwin




  #7  
Old December 28th, 2007, 03:10 PM posted to microsoft.public.word.tables
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Quickest method (from user's perspective) of populating a tabl

Brilliant! It's like drawing teeth

What sort of text? Random text? Specific text? Text from a data file?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


ashwin wrote:
I'd like to populate the rows programmatically with text.

Populate them with what?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


ashwin wrote:
I have a table with one hundred rows.

What is the quickest way to populate all one hundred rows?



  #8  
Old December 28th, 2007, 04:44 PM posted to microsoft.public.word.tables
Beth Melton
external usenet poster
 
Posts: 2,566
Default Quickest method (from user's perspective) of populating a tabl

Perhaps there is a faster way, however, we need more details on what you are
attempting to accomplish. Populating a table with text is pretty vague. Word
isn't a mind reader and while it may appear that at times we are mind
readers we're not. :-)

Please post all follow-up questions to the newsgroup. Requests for
assistance by email cannot be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Coauthor of Word 2007 Inside Out:
http://www.microsoft.com/MSPress/boo...x#AboutTheBook

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/

"ashwin" wrote in message
...
I understand that I can update the contents of each cell individually, but
is
there something faster like Pasting or setting a range to an array?



  #9  
Old December 28th, 2007, 05:09 PM posted to microsoft.public.word.tables
ashwin
external usenet poster
 
Posts: 10
Default Quickest method (from user's perspective) of populating a tabl

No problem, Beth, I'll do my best...

I have a table with one hundred rows and I know exactly what I want each
cell to contain -a string of characters.

What is the quickest way to populate that table programmatically?

Accessing each cell individually is pretty slow, especially if I'm doing
this for 200 tables. Excel allows you to populate a Sheet using an array and
I know Word will convert text formatted with tabs and carriage returns into a
table, but how do I quickly populate a table that already exists?

At this point, it looks like the answer may be the Windows clipboard –which
I’m now trying to figure out how to access/populate from VBA.


Thank you for your patience,
--
ashwin


"Beth Melton" wrote:

Perhaps there is a faster way, however, we need more details on what you are
attempting to accomplish. Populating a table with text is pretty vague. Word
isn't a mind reader and while it may appear that at times we are mind
readers we're not. :-)

Please post all follow-up questions to the newsgroup. Requests for
assistance by email cannot be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Coauthor of Word 2007 Inside Out:
http://www.microsoft.com/MSPress/boo...x#AboutTheBook

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/

"ashwin" wrote in message
...
I understand that I can update the contents of each cell individually, but
is
there something faster like Pasting or setting a range to an array?




  #10  
Old December 28th, 2007, 06:25 PM posted to microsoft.public.word.tables
Beth Melton
external usenet poster
 
Posts: 2,566
Default Quickest method (from user's perspective) of populating a tabl

Is the string of characters for each cell the same? Is there a reason you
can't modify the macro Greg provided to fit your needs? All you need to do
is change: oCell.Range.Text = i & "." to oCell.Range.Text = "Your string of
characters".

Please post all follow-up questions to the newsgroup. Requests for
assistance by email cannot be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Coauthor of Word 2007 Inside Out:
http://www.microsoft.com/MSPress/boo...x#AboutTheBook

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/

"ashwin" wrote in message
...
No problem, Beth, I'll do my best...

I have a table with one hundred rows and I know exactly what I want each
cell to contain -a string of characters.

What is the quickest way to populate that table programmatically?

Accessing each cell individually is pretty slow, especially if I'm doing
this for 200 tables. Excel allows you to populate a Sheet using an array
and
I know Word will convert text formatted with tabs and carriage returns
into a
table, but how do I quickly populate a table that already exists?

At this point, it looks like the answer may be the Windows
clipboard -which
I'm now trying to figure out how to access/populate from VBA.


Thank you for your patience,
--
ashwin


"Beth Melton" wrote:

Perhaps there is a faster way, however, we need more details on what you
are
attempting to accomplish. Populating a table with text is pretty vague.
Word
isn't a mind reader and while it may appear that at times we are mind
readers we're not. :-)



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.