Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2007

Tip: Looking for answers? Try searching our database.

Using word tables for database query/reporting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JustSomeGuy - 14 Aug 2007 20:12 GMT
I have two Word tables, each in its own Word .doc.

Word Table 1 is a table of project titles (column 1) and project details
(columns 2-x).

Word Table 2 is an empty, carefully formatted ‘Project Summary” table. (like
a report ‘screen’)

The idea is to peruse Table 1, select Project (row), click a macrobutton,
and generate a Project Summary (Table 2), populated with the data from
project row 1.  Then, select  some other project (row)  in Table 1, and
generate another populated Project Summary (Table 2) for that project, etc,
until a total of x Project Summary tables have been generated.

I know how to make macrobuttons, but am unclear on how to construct the
syntax that would be needed.

The overall goal is to achieve something akin to a database (using just Word
tables) that, when manually queried, can generate populated, formatted MS
Word 'display tables'.
 
This could be used to generate formatted ‘bios’ from a Word table (database)
of employees, or to generate project summary tables for use in proposals to
show past performance, etc.
Doug Robbins - Word MVP - 15 Aug 2007 01:32 GMT
To get the information out of a cell in a table, use

Dim myrange as range
Set myrange = ActiveDocument.Tables(1).Cell(rownum, colnum).Range
myrange.End = myrange.End -1 'strips off the end of cell marker

myrange.Text will now contain the text that was in the cell.

You may however find a more efficient way to do what you want by using
Table1 as a mailmerge data source for a maindocument that contains table 2.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I have two Word tables, each in its own Word .doc.
>
[quoted text clipped - 25 lines]
> to
> show past performance, etc.
JustSomeGuy - 18 Aug 2007 03:10 GMT
Doug, You were right; a 'mail merge' from table 1 to table 2 worked like a
charm.  A good example of how 'merge' isn't just for letters!  Thanks for the
suggestion.

> To get the information out of a cell in a table, use
>
[quoted text clipped - 36 lines]
> > to
> > show past performance, etc.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.