The code loops through all the bookmarks in the active document and if it finds a bookmark named 'code' (without the quotes) it will create the folder if missing and save the document in that folder.
If the bookmark is not found, as you have suggested, it reports that it is not found.
From the 'Insert Tab', click 'Bookmark' and see if 'code' is listed. Ensure that the name has no leading or trailing space.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
|