WindmillChaser
Technical User
I have an application where I fill in the values of the bookmarks in a word template. I need to loop a file to add up the quantity. At I loop the assigned the value to the bookmark,
objDoc.Bookmarks("Quantity").Range.Text = Qty1
When it loop comes around it is assigned the new value
objDoc.Bookmarks("Quantity").Range.Text = Qty2
However, when this is printed on the document I see, Qty1Qty2. I had expected Qty2 to overwrite Qty1.
When I look at the value of the bookmark after the first loop, it shows nothing. This again is unexpected for me.
What is the proper way to do this?
Thanks.
objDoc.Bookmarks("Quantity").Range.Text = Qty1
When it loop comes around it is assigned the new value
objDoc.Bookmarks("Quantity").Range.Text = Qty2
However, when this is printed on the document I see, Qty1Qty2. I had expected Qty2 to overwrite Qty1.
When I look at the value of the bookmark after the first loop, it shows nothing. This again is unexpected for me.
What is the proper way to do this?
Thanks.