Strange, as:
MsgBox ActiveDocument.Range.Paragraphs(1).Style _
& vbCrLf & _
ActiveDocument.Range.Paragraphs(1).Range.Style _
& vbCrLf & _
ActiveDocument.Paragraphs(1).Style
gives three exact same results.for paragraph 1.
Edward wrote:
>Hi everybody,
>What is the difference between these two codes
>dim sec as section
>if sec.Range.Paragraphs(1).Range.Style="..." then
>
>and
>dim sec as section
>if sec.Range.Paragraphs(1).Style="..." then
>
>the first version which is a amll pert of my code sometimes generates error
>when paragraph marker if off but when I turn on the paragraph marker it works!
>
>so I wonder what does that addition .Range do in the code.
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200804/1