• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Automating MS Word via MS Excel.

sumitbansal

Member
Hi,

I am here again with a new problem.. I don't know Word VBA and recently was asked to make a macro in word. To be more precise, there is a book typed in MS Word and the owner wants that he should be able to mark certain lines/paragraphs/pages with any given identifier throughout the book (chapter wise) and as soon as he runs the macro, all the marked data - Chapter wise should come in a new file with chapter name and page number (where the data was originally placed in the original book). All chapters' data may come in a same newly opened workbook.

Now, the problem is that I do not know Word VBA, and I do have certain knowledge of Excel VBA, so I was thinking to do the same stuff via excel (as a workaround); but even in that case, I have to have the knowledge of word object model which is confusing. so, please help me with suggestions or a macro.

I will be a great help and also an insight into excel being able to deal with other MS Office products.

I also hope that I am not violating any rule of this forum by asking help on Word VBA.


Thanks in advance,

Sumit.
 
Hi Sumit ,


A question was asked on a similar topic , whose link is here :


http://chandoo.org/forums/topic/excel-vba-create-multiple-word-docs


What we can take away from that topic , is that if you can setup the Word document with bookmarks , then it is a simple matter to go through each of the bookmarks , one by one , retrieve the text from that region in the document , and paste it in an Excel worksheet.


If your Word document has a Table of Contents page , listing all the chapter headings , and their corresponding start pages , then all your bookmarks can be on just this one page.


Narayan
 
Back
Top