Results 1 to 2 of 2

Thread: WORD as in .doc

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Exclamation

    Hi,

    I have an opened WORD doc with unknown number of
    paragraphs. How can I select the first line of
    each paragraph?

    Thank you
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    I can get you part way there. This code will find the first three left-justified paragraphs

    wdApp.Selection.Find.ClearFormatting
    wdApp.Selection.Find.ParagraphFormat.Alignment = wdAlignParagraphLeft
    With wdApp.Selection.Find
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    wdApp.Selection.Find.Execute
    wdApp.Selection.Find.Execute
    wdApp.Selection.Find.Execute

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width