PDA

View Full Version : Current line number & first letter of string is first letter of the line



nkpan
06-01-2018, 01:57 AM
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.

Hightree
06-01-2018, 03:41 AM
Perhaps you can show us a example?

macropod
06-01-2018, 05:13 AM
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'.