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 / February 2005

Tip: Looking for answers? Try searching our database.

Word Data Acquisition 101

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JTH - 25 Feb 2005 20:41 GMT
I have VBA code for Excel that gathers the data from a worksheet for export
to another application. The knuckleheads I work for now want the data to be
in a word doc / table instead of Excel.  I have not idea where to start with
Word.

Idea #1 - Embed a XLM Excel in the word doc and figure out how to access the
data that way.

Idea #2 - Use bookmarks to index the needed fields????

Idea # 3  - Cry

I have no idea about the Word Object Model. Any ideas??? Starting place???

Signature

JTH

Jonathan West - 25 Feb 2005 20:48 GMT
> I have VBA code for Excel that gathers the data from a worksheet for
> export
[quoted text clipped - 13 lines]
>
> I have no idea about the Word Object Model. Any ideas??? Starting place???

The Document object have a Tables collection. Each Table object has a Cell
collection. So if you want the text out of the cell in row 3, column 5, then
this will do the trick

MsgBox ActiveDocument.Tables(1).Cell(3, 5).Range.Text

You may also find this article helpful on the Word object model

Getting To Grips With VBA Basics In 15 Minutes
http://www.word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

 
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.