Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to sum 2 cells in a straight table and place the value in VAR_SUM variable.
The following macro gives me the error Type mismatch on line st3 = st1 + st2:
Set st = ActiveDocument.GetSheetObject("CH15")
st1 = st.GetCell(1, 4)
st2 = st.GetCell(4, 4)
st3 = st1 + st2
ActiveDocument.Variables("VAR_SUM").SetContent st3.Number, true
How do I do this?
Many thanks!
Hello,
It should be as simple as
st3 = st1.Text + st2.Text
Hope that helps.
Thanks a lot Miguel!