So a while back someone was nice enough to help me work out some code
Code: Select all
Path := "C:\Users\User1\Desktop\letter.docx"
oWord := ComObjCreate("Word.Application")
oWord.Documents.Open(Path)
oWord.Visible := 1
oWord.Selection.Find.ClearFormatting
oWord.Selection.Find.Replacement.ClearFormatting
for k, v in ["[Address]", Street, "[City]", City, "[State]", State, "[ZipCode]", ZipCode]
if Mod(k, 2)
st := v
else
oWord.Selection.Find.Execute(st, 0, 0, 0, 0, 0, 1, 1, 0, v, 2)
oWord := ""
Code: Select all
if Mod(k, 2)
st := v