![]() |
|
#7
|
|||
|
|||
|
Quote:
These content controls are linked to the same node Insert your picture into the "Picture" content control. The string you are interested in will be in the Plain Text content control Code:
Sub Two_Mapped_CC()
'
Dim oCC As Word.ContentControl
Dim oCustomPart As Office.CustomXMLPart
Dim orng As Range
Set oCustomPart = ActiveDocument.CustomXMLParts.Add("<ccMap><ccData></ccData></ccMap>")
Set oCC = ActiveDocument.ContentControls.Add(wdContentControlPicture)
With oCC
.Title = "Picture"
.XMLMapping.SetMapping "/ccMap/ccData[1]"
End With
Set orng = oCC.Range.Paragraphs(1).Range
With orng
.InsertParagraphAfter
.InsertParagraphAfter
.MoveEnd Unit:=wdCharacter, Count:=2
.Start = orng.End
End With
Set oCC = orng.ContentControls.Add(wdContentControlText)
With oCC
.Title = "Str"
.XMLMapping.SetMapping "/ccMap/ccData[1]"
End With
Set oCC = Nothing
Set oCustomPart = Nothing
Set orng = Nothing
Exit Sub
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Filling in cells based on 2 other cells data | Dawindle | Excel | 4 | 11-10-2018 07:40 AM |
| filling in blank cells with data from cell above | RayK | Excel | 1 | 01-12-2017 04:14 PM |
| Wierd... "cell" started auto filling with data from other cells I double click on. How stop it?! | KerryOn | Excel | 2 | 08-10-2015 08:41 PM |
matching data from one work sheet to another, then auto filling missing cell information
|
timomaha | Excel | 1 | 09-12-2014 07:51 AM |
New to Excel - Filling out data
|
The Accountant | Excel | 2 | 12-16-2013 12:32 PM |