PDA

View Full Version : VBA, retreive information from a word document and store it in the Excel



Cariboost
07-02-2014, 10:31 AM
Hi,

I am trying to do something big that would truly help my company.

My goal is to simple :

I want to retreive information from several document, one by one.

Each document is structured as below :

1st chapter (style called "Heading 1;SQS_Heading1")
text
subchapter 1.1 (style called "Heading 2;Heading 2 Char;H2; Char")
text
subchapter 1.2 (same style for all subchapter
text
2nd chapter (same style for all chapter)
text
subchapter 2.1 (style called "Heading 2;Heading 2 Char;H2; Char")
text
subchapter 2.2 (same style for all subchapter
text



For each document I want to :

Open the document
store in an excel file :

nb of characters in text in chapter 1
nb of characters in text in subchapter 1
nb of characters in text in subchapter 2
nb of characters in text in chapter 2
etc.


Close document




So my question is,
1/ is it possible ?
2/ How to do something like this ?

I have searched a lot without any luck...

Thanks a lot for your help in advance !

Sincerelly,
Cariboost.

westconn1
07-05-2014, 05:37 AM
can you post a sample of word document with those chapters and sub chapters, include a page containing list of all the desired correct results for testing?