Consulting

Results 1 to 3 of 3

Thread: Current line number & first letter of string is first letter of the line

  1. #1
    VBAX Regular
    Joined
    Apr 2018
    Location
    MUMBAI
    Posts
    13
    Location

    Current line number & first letter of string is first letter of the line

    Hello all,

    I am working on a excel macro where a word file is opened and a list of string are searched.

    I want to check if the string being searched is positioned at the start of a line. But i don't want the system to use cursor or selection, a simple find and execute and to check if the first character of the selected string is the first character of the line.

    Any help would be greatly appreciated.

  2. #2
    VBAX Regular
    Joined
    Jan 2018
    Location
    The Netherlands
    Posts
    45
    Location
    Perhaps you can show us a example?

  3. #3
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Word isn't designed to work with lines, as such, since its use of information from the active printer driver to optimise the page layout means what starts a line on one PC might not start the same or any line on another PC. Word can always tell you whether a string starts or ends at the start or end of a paragraph, respectively, though. Hence, you need to be clearer about what you mean by 'the start of a line'.
    Last edited by macropod; 08-23-2018 at 04:52 PM.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

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