![]() |
#1
|
|||
|
|||
![]()
Hello
I am writing a code that analyses a word document and puts important information into a xml file. For example every Heading is important. I read a lot of prefering Range over Selection. But how do i use this. The documents, which the code analyses, are all different and have different numbers of Headings and Tables and other Text. So does it make sense to use Range? And if so, please let me know how. Thanks |
#2
|
||||
|
||||
![]()
The code I provided in this https://www.msofficeforums.com/word-...there-one.html uses ranges instead of selections. You will also find that almost all of the code I've posted on msofficeforums.com uses ranges. Most other vba coders contributing solutions here do likewise.
Since we don't know exactly what it is you want to do, it's hard to give specific advice. There are, of course, times when one must revert to using Selection (e.g. to do something in one go to a whole table column), but those times are fairly rare.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ramsgarla | Word VBA | 9 | 12-05-2012 03:23 AM |
![]() |
Thokkle | Word | 1 | 04-01-2012 06:46 PM |
How do you add to a selection list? | bryanarn | Excel | 2 | 03-05-2012 05:04 PM |
![]() |
g48dd | Excel Programming | 7 | 06-20-2011 06:34 AM |
![]() |
cksm4 | Word VBA | 25 | 01-30-2011 11:44 PM |