excel - VBA script to replace cell value and keep formatting -
i have below table in word i'm trying write script replace contents of below cell different customer payment (i.e replace £1,100 £2,000). below snippet of script when write cell loses formatting , numbered list.
how can keep replace cell data similar data , still keep formatting?
ps. i've simplified contents of cell make easier read, code won't apply content
descplan = trim(t1.cell(2, 2).range.text) desctest = instr(1, descplan, ":") finalstring = left(descplan, desctest) t1.cell(2, 2).range.text = replace(descplan, finalstring, "payment customer of " + format(v, "currency") + " due upon completion of items below:")
wiki
Comments
Post a Comment