C
Chuck
Hi,
I need some assistance with determining the number of
space characters in a line. I am currently counting the
total number of characters ok but now need to somehow
identify the number of spaces (or tabs) before the first
significant character in a line. I count total characters
by using the ConvertToTable method on the entire document,
then iterate throught the rows checking the number of
characters in a line. Please see the following snippet of
code for my method. (Assume all variables and objects
correctly defined)
myDoc.select
Set mysel = .Selection
mysel.ConvertToTable Separator:=wdSeparateByParagraphs,
NumColumns:=1, Format:=wdTableFormatNone, etc...(more
parameters here)
linect = 1
Do while linect < totalLines 'calc'd earlier in module
Charcnt = 0
Charcnt = mysel.Rows(linect).Range.Characters.Count
(...some more conditional code here)
mysel.MoveDown(wdLine)
linecnt = linecnt + 1
Loop
This gives me total character count per line but what I
also need is to identify how many spaces (or tab)
characters precede the first significant character.
Thanks in advance for your assistance.
I need some assistance with determining the number of
space characters in a line. I am currently counting the
total number of characters ok but now need to somehow
identify the number of spaces (or tabs) before the first
significant character in a line. I count total characters
by using the ConvertToTable method on the entire document,
then iterate throught the rows checking the number of
characters in a line. Please see the following snippet of
code for my method. (Assume all variables and objects
correctly defined)
myDoc.select
Set mysel = .Selection
mysel.ConvertToTable Separator:=wdSeparateByParagraphs,
NumColumns:=1, Format:=wdTableFormatNone, etc...(more
parameters here)
linect = 1
Do while linect < totalLines 'calc'd earlier in module
Charcnt = 0
Charcnt = mysel.Rows(linect).Range.Characters.Count
(...some more conditional code here)
mysel.MoveDown(wdLine)
linecnt = linecnt + 1
Loop
This gives me total character count per line but what I
also need is to identify how many spaces (or tab)
characters precede the first significant character.
Thanks in advance for your assistance.