Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Ashwin Ashwin is offline
external usenet poster
 
Posts: 8
Default Quickest method (from users 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   Report Post  
Posted to microsoft.public.word.tables
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
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   Report Post  
Posted to microsoft.public.word.tables
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 285
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   Report Post  
Posted to microsoft.public.word.tables
Ashwin Ashwin is offline
external usenet poster
 
Posts: 8
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   Report Post  
Posted to microsoft.public.word.tables
Ashwin Ashwin is offline
external usenet poster
 
Posts: 8
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   Report Post  
Posted to microsoft.public.word.tables
Ashwin Ashwin is offline
external usenet poster
 
Posts: 8
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   Report Post  
Posted to microsoft.public.word.tables
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
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   Report Post  
Posted to microsoft.public.word.tables
Beth Melton Beth Melton is offline
external usenet poster
 
Posts: 1,380
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   Report Post  
Posted to microsoft.public.word.tables
Ashwin Ashwin is offline
external usenet poster
 
Posts: 8
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
Im 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   Report Post  
Posted to microsoft.public.word.tables
Beth Melton Beth Melton is offline
external usenet poster
 
Posts: 1,380
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. :-)





  #11   Report Post  
Posted to microsoft.public.word.tables
Ashwin Ashwin is offline
external usenet poster
 
Posts: 8
Default Quickest method (from user's perspective) of populating a tabl

The text in each cell will be different.

Im currently updating each cell individually, but I havent tried Gregs
..Next property/method €“I imagine that has to be faster than indexing into the
table using the Cell object.

What Im really trying to find out is: Does anyone know THE FASTEST METHOD
(from the users perspective) of accomplishing this?

I thought pasting would be even faster than snaking through each cell, but
it doesnt seem like anyone wants to touch this one (or is it just a silly
assumption?).
--
ashwin


"Beth Melton" wrote:

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. :-)




  #12   Report Post  
Posted to microsoft.public.word.tables
Beth Melton Beth Melton is offline
external usenet poster
 
Posts: 1,380
Default Quickest method (from user's perspective) of populating a tabl

I think the underlying problem with providing you with the answer you are
looking for is we still don't understand where you are getting the text you
intend to place in each cell. IOW, other than populate a table with some
text we don't know what you are attempting to accomplish. If we don't know
what you are trying to accomplish then we don't have any recommendations.
Perhaps you could provide some background on where you are getting the
text/data and what you want as the final result. Additionally, what you mean
by "user's perspective" would be good to know too.

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
news
The text in each cell will be different.

I'm currently updating each cell individually, but I haven't tried Greg's
.Next property/method -I imagine that has to be faster than indexing into
the
table using the Cell object.

What I'm really trying to find out is: Does anyone know THE FASTEST METHOD
(from the user's perspective) of accomplishing this?

I thought pasting would be even faster than snaking through each cell, but
it doesn't seem like anyone wants to touch this one (or is it just a silly
assumption?).
--
ashwin


"Beth Melton" wrote:

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".


"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. :-)






  #13   Report Post  
Posted to microsoft.public.word.tables
Ashwin Ashwin is offline
external usenet poster
 
Posts: 8
Default Quickest method (from user's perspective) of populating a tabl

I have a DAO.Recordset I want to display in a table.
The table is already formatted.
I want to fill the table as quickly as possible from the users perspective
(the shortest amount of time as it will appear to the end-user while the
system is running).
--
ashwin


"Beth Melton" wrote:

I think the underlying problem with providing you with the answer you are
looking for is we still don't understand where you are getting the text you
intend to place in each cell. IOW, other than populate a table with some
text we don't know what you are attempting to accomplish. If we don't know
what you are trying to accomplish then we don't have any recommendations.
Perhaps you could provide some background on where you are getting the
text/data and what you want as the final result. Additionally, what you mean
by "user's perspective" would be good to know too.

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
news
The text in each cell will be different.

I'm currently updating each cell individually, but I haven't tried Greg's
.Next property/method -I imagine that has to be faster than indexing into
the
table using the Cell object.

What I'm really trying to find out is: Does anyone know THE FASTEST METHOD
(from the user's perspective) of accomplishing this?

I thought pasting would be even faster than snaking through each cell, but
it doesn't seem like anyone wants to touch this one (or is it just a silly
assumption?).
--
ashwin


"Beth Melton" wrote:

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".


"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. :-)






  #14   Report Post  
Posted to microsoft.public.word.tables
Beth Melton Beth Melton is offline
external usenet poster
 
Posts: 1,380
Default Quickest method (from user's perspective) of populating a tabl

NOW we're getting somewhere. :-)

Can't you use something like:

Set oCell = Selection.Tables(1).Cell(1, 1)
Do While Not rs.EOF
oCell.Range.Text = rs.Fields("FieldName")
Set oCell = oCell.Next
rs.MoveNext
Loop

I tested this with around 400 records and it only took a second or two. Note
I also used an ADO recordset but that shouldn't matter that much.

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 have a DAO.Recordset I want to display in a table.
The table is already formatted.
I want to fill the table as quickly as possible from the user's
perspective
(the shortest amount of time as it will appear to the end-user while the
system is running).
--
ashwin


"Beth Melton" wrote:

I think the underlying problem with providing you with the answer you are
looking for is we still don't understand where you are getting the text
you
intend to place in each cell. IOW, other than populate a table with some
text we don't know what you are attempting to accomplish. If we don't
know
what you are trying to accomplish then we don't have any recommendations.
Perhaps you could provide some background on where you are getting the
text/data and what you want as the final result. Additionally, what you
mean
by "user's perspective" would be good to know too.


"ashwin" wrote in message
news
The text in each cell will be different.

I'm currently updating each cell individually, but I haven't tried
Greg's
.Next property/method -I imagine that has to be faster than indexing
into
the
table using the Cell object.

What I'm really trying to find out is: Does anyone know THE FASTEST
METHOD
(from the user's perspective) of accomplishing this?

I thought pasting would be even faster than snaking through each cell,
but
it doesn't seem like anyone wants to touch this one (or is it just a
silly
assumption?).
--
ashwin


"Beth Melton" wrote:

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".


"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. :-)








Reply
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
Preserve table format after InsertDatabase method? Barry Mailmerge 1 November 8th 06 10:10 PM
Keeping A Table Together, Suzanne's Method Not Working ron10bees Tables 2 October 5th 06 11:02 PM
When making text-boxes 3-D, can I make text change perspective? The Mekon Microsoft Word Help 1 August 14th 06 01:53 PM
Populating Checkboxes Tammy Microsoft Word Help 0 September 21st 05 02:11 AM
Is there a method of keeping all rows within a table together? Christopher T.G. Collins Tables 3 July 5th 05 09:19 AM


All times are GMT +1. The time now is 10:16 AM.

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"