Hi ,
I need some help on creating a macro. This is my first time using VBA. What I am trying to is take a existing .rtf file and search through it and find any string that has a strikethrough and a redfont. Once I find it I want to insert the symbol [& &] around the string to indicate that the string has a strikethrough and a red font.
Here's what I want to do in rough terms:
open .rtf file
dim strvar as string
***this where I am stuck***
// break up the whole line
strvar = I want to assign this value to text in my .rtf file
Is there a equivalent to a strtok function?
rtfvar = parameters in the line
if rtfvar == '/strike' then
// move to next parameter
if rtfvar== '/cf6' then
// then insert [& in front of string= '[&' + Left(strvar)
Right(strvar) + '&]'
I need some help on creating a macro. This is my first time using VBA. What I am trying to is take a existing .rtf file and search through it and find any string that has a strikethrough and a redfont. Once I find it I want to insert the symbol [& &] around the string to indicate that the string has a strikethrough and a red font.
Here's what I want to do in rough terms:
open .rtf file
dim strvar as string
***this where I am stuck***
// break up the whole line
strvar = I want to assign this value to text in my .rtf file
Is there a equivalent to a strtok function?
rtfvar = parameters in the line
if rtfvar == '/strike' then
// move to next parameter
if rtfvar== '/cf6' then
// then insert [& in front of string= '[&' + Left(strvar)
Right(strvar) + '&]'