Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2014, 01:08 AM
Tommes93 Tommes93 is offline Selection or Range Windows 7 64bit Selection or Range Office 2007
Novice
Selection or Range
 
Join Date: Mar 2014
Posts: 9
Tommes93 is on a distinguished road
Default Selection or Range

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
Reply With Quote
  #2  
Old 04-10-2014, 02:50 AM
macropod's Avatar
macropod macropod is offline Selection or Range Windows 7 32bit Selection or Range Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selection or Range Selection of all Text for a specific page in word is spanning selection across pages ramsgarla Word VBA 9 12-05-2012 03:23 AM
Selection or Range Selection is locked 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
Selection or Range use VBA to name a range g48dd Excel Programming 7 06-20-2011 06:34 AM
Selection or Range Save Selection cksm4 Word VBA 25 01-30-2011 11:44 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft