View Full Version : Solved: How I'll find a character position in a word document?
Grigoras
02-26-2008, 07:03 AM
Hi!I want to now the VBA code to find the first position of a character (@for example) in a word document. (document.@character) @ can be finded in many places , but I want to know position of the first @ in the document.
Thanks,:help
Tinbendr
02-26-2008, 08:19 AM
Sub FindCharacterPosition()
Dim MyRange As Range
Set MyRange = ActiveDocument.Range
MyRange.Find.Execute FindText:="@"
MsgBox "Position = " & MyRange.Start
End Sub
TonyJollans
02-26-2008, 08:23 AM
With ActiveDocument.Range
If .Find.Execute("@") Then MsgBox .Start
End With
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.