View Single Post
 
Old 03-07-2014, 12:18 PM
Ulodesk Ulodesk is offline Windows 7 64bit Office 2013
Word 2013 Expert Cert
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Some success, believe it or not

Thank you again.

After a half hour of trial and error, I discovered that the way to have the bookmarked text from Text1 come in when the checkbox is checked, rather than unchecked, was to remove from the macro the " + 1" at the end of the line

Code:
.CustomDocumentProperties("CheckNo").Value = .FormFields("Check1").Result + 1
This solution—the only one I could make work—now returns (if that's the right term)

Error! Bookmark not defined.

when the box is unchecked, but I can live with that. I had just thought that it would return nothing, i.e., the empty paragraph of the second bookmark.

I realize and respect that code is as plain as English to you, but since the mechanics of all this still remain obscure to me, an hour of attempts has failed in creating a first additional check box and includetext field to add additional bookmarked text from the source doc. I simply don’t know what to change, though I thought I had grasped the process.

I have, strangely, been able to repeat exactly what the field you created does, with the same text brought in, even though I created a CheckNo2 custom document property, and two more bookmarks with another paragraph and another empty one. I tried duplicating the Update macro as Update2 and changing the line shown above to

Code:
.CustomDocumentProperties("CheckNo2").Value = .FormFields("Check2").Result
to, I thought, correspond to the new references, but that crashed the document without producing the desired result.

If I may ask you to once again correct my error, perhaps I can see where the difference lies and use that for all the additional check boxes and future documents I need to create.

Best,
Philip
Reply With Quote