View Single Post
 
Old 11-01-2013, 05:43 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi swissmiss,

You can't get the pictures content control to activate the clipart dialogue. However, you can get the Insert|Picture dialog box used by the content control to point to the ClipArt folder by adding code like the following to the document's 'ThisDocument' code module and give the applicable content control(s) the title ‘ClipArt’. One quirk about this approach is that you’ll need to click on the blue area surrounding the picture icon; otherwise the dialog opens up with the default pictures path. Conversely, if you prefer, you could also/instead use the same code on a Rich Text content control titled ‘ClipArt’.
Code:
Private Sub Document_ContentControlOnEnter(ByVal ContentControl As ContentControl)
Dim StrPath As String
If ContentControl.Title = "ClipArt" Then
With Application.Dialogs(wdDialogInsertPicture)
StrPath = Options.DefaultFilePath(Path:=wdPicturesPath)
Options.DefaultFilePath(Path:=wdPicturesPath) = "C:\Program Files\Microsoft Office\MEDIA\CAGCAT10\"
.Update
If .Show = True Then
  With ContentControl.Range
    If .InlineShapes.Count > 1 Then .InlineShapes(1).Delete
  End With
End If
Options.DefaultFilePath(Path:=wdPicturesPath) = StrPath
End With
End If 
End Sub
Additionally, since Windows Explorer no longer displays thumbnail image previews of EMF (Enhanced Metafile) and WMF (Windows Metafile) vector graphic images, the wmf files in the Insert|Picture dialog box simply display a generic icon, which isn’t much help when it comes to identifying the images. Accordingly, if you want to see the thumbnails, you may need to download & install the appropriate EMF and WMF thumbnail preview plug-in at: http://code.google.com/p/emfplugin/
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote