I have a combo box (combo1) in a word document and I would like to copy it to another word document. (end game will be looping through 100's of docs).
I can't for the life of me work out how to select and/or copy the combo box, although its easy enough to do outside of vba.
So far I've tried turning it into a bookmark, seems to select ok, but won't copy.
ActiveDocument.Bookmarks(combo1_bm).Select
Selection.Copy
I thought it would be able to done as an inline shape (as that is how they are added?), however again the selection appears to work, but the Copy doesn't.
ActiveDocument.InlineShapes(combo1).Select
Selection.Copy
Any ideas on what I can try next?
Cheers, Michael
Your attempt with bookmark was quite good. You just need to extend your code a bit:
ActiveDocument.Bookmarks("combo1_bm").Range.Copy
....
Selection.Paste 'or different pasting procedure
Keep in mind that you don't need to select object before copy it. Just try doing as I show above. Moreover, don't miss quotation marks for names or use bookmark index to work with appropriate one. Copy method
will copy inside range of the bookmark and keep original bookmark in place, unchanged.