PDA

View Full Version : word to Excel or Access



sampath_123
02-20-2009, 11:05 AM
hi i am a new to VBA its great thing that i am learning VBA very Quickly by looking at the posts in the forum.Thanks for all your help.I have a small requirement to export the contents of my word document into an Excel file or an Access Database
My word document does not contain much information

Ex:
xyz [Heading]
xxxxxxx *******content
pqr -[Heading]
pppppppp ******content
I want to make a new column with name Xyz and xxxxxxxxxx as content of that column
same with Pqr

please provide me some sample code or logic which helps me to do this task

CreganTur
02-20-2009, 12:19 PM
When you say content, are you talking about data from form fields or other objects in word, or are you talking about all of the text in a word document?

Which application do you want to work with: Excel or Access? In either case, the easiest way to push data from Word to either of these applications would be though using a Data Access Objects (DAO) or ActiveX Data Objects (ADO) connection. You can google a lot of good resources on both of these, and there are also good resources in Acces/Excel help.

Exactly how you go about this will depend on what you are spcifically wanting to move out of Word.