![]() |
|
#10
|
||||
|
||||
|
To use the userform with content controls instead of bookmarks, you might replace:
Code:
Call UpdateBookmark("Description", "Widget Type A")
Call UpdateBookmark("Revision", "1.01")
Call UpdateBookmark("Material", "PVC")
Call UpdateBookmark("Job_No", "1234")
Code:
With ActiveDocument
.SelectContentControlsByTitle("Description")(1).Range.Text = "Widget Type A"
.SelectContentControlsByTitle("Revision")(1).Range.Text = "1.01"
.SelectContentControlsByTitle("Material")(1).Range.Text = "PVC"
.SelectContentControlsByTitle("Job_No")(1).Range.Text = "1234"
End With
The code you're thinking of using would require all the content to be used for 'StrDetails' to be added programmatically to each of the userform ListBox's entries and, when an item is selected, retrieved from there before it could be used to populate the content controls.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBA ppt ComboBox behaivor: 1.OnFocus change value 2. get dropdownlist doesn't disappear after mousec | janism22 | PowerPoint | 2 | 03-26-2015 12:35 AM |
| ActiveDocument.ContentControls(ID) not working | Tejas.T | Word VBA | 3 | 03-09-2015 06:50 PM |
| Updating grouped ContentControls in Word 2010 | MGerhard | Word VBA | 3 | 08-04-2014 02:34 AM |
Parsing 'FullName' column - help needed text to column
|
ScottA | Excel Programming | 3 | 05-06-2014 12:49 PM |
| XML parsing & Object variable not set (Error 91) | tinfanide | Excel Programming | 0 | 12-29-2011 08:43 AM |