Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-15-2011, 08:51 AM
SDondeti SDondeti is offline Word VBA - Find Windows XP Word VBA - Find Office 2007
Novice
Word VBA - Find
 
Join Date: Apr 2011
Posts: 7
SDondeti is on a distinguished road
Default Word VBA - Find

Hi,



Word VBA code was written in finding the word in a document and trying to get next word or characters after search word.

Example: In a sample.dotm, I am searching a word "Heading" in a forward=false which means up. I am able to find it and i want to know the next word or next characters after "Heading" using word vba.

Can some one help me out.

Here is the code i am trying to use:

Code:
With Selection.Find
  .text = "Heading"
  .Replacement.text = ""
  .Forward = True
  .Wrap = wdFindAsk
  .Format = False
  .MatchCase = True
  .MatchWholeWord = False
  .MatchWildcards = False
  .MatchSoundsLike = False
  .MatchAllWordForms = False
End With
Selection.Find.Execute
how to find the reference where the search word is found?

Thanks in advance.

SDondeti.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word VBA - Find Lost Word Document and cant find it!!! I saved it but it ISNT there!! APAV Word 9 10-09-2017 01:17 PM
How to find out the version of the word files? mariaprabudass Word 0 06-18-2010 05:40 AM
Word VBA - Find can Find/Replace NOT find something? Bobosmite Word 6 05-27-2010 08:09 PM
How to find the version of word file? mariaprabudass Word 6 04-29-2010 03:33 AM
FInd recurring words in Word 2003 NJ007 Word 4 01-25-2010 03:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:25 AM.


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