![]() |
|
#6
|
||||
|
||||
|
OK. I think
. The code I originally posted demonstrates how to copy data from an Excel VBA userform to bookmark(s) in a Word document. If that is not what you want to do, what is it that you want to copy to either document and/or from one document to another and where does the userform come into it? A pair of buttons doesn't convey much.The original code can easily be adapted to open a second document, and put data in that. However, you have referred to checking if a bookmark is filled in the first document to determine whether to write a value to a bookmark in the second document. That would be easy enough, but it is essential to learn where the new data for that bookmark comes from, and what causes the value in the bookmark to change. If it is being changed by the Userform then there is no need to evaluate the bookmark content as you can use the fact that you have written to it to determine that it has been changed. Clearly it won't be changed by the simple process of opening it. Why are there two buttons on the userform? Surely it would be possible to use only one to avoid even more confusion? The code could conditionally open a second document, or choose between two documents according to what information you have. A more complete description of the process is therefore required.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
| Tags |
| bookmarks, transfer, vba excel |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trying to populate Word bookmarks with excel UserForm | smd1112 | Excel Programming | 7 | 09-03-2014 09:42 PM |
Excel to word transfer
|
Raviraj | Word | 5 | 04-29-2014 02:47 AM |
| Data transfer from Word tables to Excel | shoro | Word | 4 | 10-01-2013 05:08 AM |
Transfer Outlook info to Excel
|
methedr | Outlook | 1 | 05-24-2010 05:48 AM |
| How to transfer Word 2003 Tables to Excel? | steeleye | Word Tables | 1 | 07-10-2009 04:18 PM |