Picture content control assistance
-
- SilverLounger
- Posts: 1868
- Joined: 25 Jan 2010, 14:00
- Location: Conroe, Texas
Picture content control assistance
I have a word doc that uses picture content control to help with inserting photos into different tables. Sometimes I may not use all picture content controls, thus leaving a shades area. Is there any type of setting that if not used then the shading would not be visible.
-
- Administrator
- Posts: 78647
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- SilverLounger
- Posts: 1868
- Joined: 25 Jan 2010, 14:00
- Location: Conroe, Texas
Re: Picture content control assistance
Thank you Hans
I wasn’t for sure if this was possible or not. What I have is a report that is generated using a word doc. I was attempting to have a simple approach that would insert a photo into a table, without having to make any adjustments or the use code and thus creating a macro enabled word doc. That’s the nice thing about picture content control, except this of course.
I wasn’t for sure if this was possible or not. What I have is a report that is generated using a word doc. I was attempting to have a simple approach that would insert a photo into a table, without having to make any adjustments or the use code and thus creating a macro enabled word doc. That’s the nice thing about picture content control, except this of course.
-
- Administrator
- Posts: 7219
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: Picture content control assistance
Could you insert a 'blank' (e.g. plain white) picture by default to cover the shaded area?
Leif
-
- SilverLounger
- Posts: 1868
- Joined: 25 Jan 2010, 14:00
- Location: Conroe, Texas
Re: Picture content control assistance
I added a blank, white in color picture, but by doing so it prevent from selecting another picture. I also tried a few other approaches. The picture on the left I first tried to fill table, no success, I then tried right clicking on picture content control and selected format picture/fill (I also tried transparency). The picture on the right I tried boarder and shading / fill. The picture content control seems to stay in front. But if I were able to have the fill in front would it not prevent me from selecting picture content control.
You do not have the required permissions to view the files attached to this post.
-
- SilverLounger
- Posts: 1868
- Joined: 25 Jan 2010, 14:00
- Location: Conroe, Texas
Re: Picture content control assistance
What I ended up doing was adding a bookmark (font size 6) to each target table. This is to help reduce the size of page before photo is inserted. I created a Userform with different buttons to refer to the different target locations with the use of this code listed below. I previously received a similar code from Hans about a year ago or so and I simply made some adjusts so as to select a single bookmark.
Code: Select all
Dim rng As Range
Dim sFileName As String
Dim ilImage As Object
On Error GoTo EH
If Not ActiveDocument.Bookmarks("elec2").End Then
End If
Set rng = ActiveDocument.Bookmarks("elec2").Range
If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
ActiveDocument.Unprotect ""
End If
With Dialogs(wdDialogInsertPicture)
.Display
If .Name <> "" Then
sFileName = .Name
Set ilImage = ActiveDocument.InlineShapes.AddPicture(sFileName, , True, rng)
With ilImage
.Height = Application.InchesToPoints(2#)
.Width = Application.InchesToPoints(2.5)
End With
End If
End With
ActiveDocument.Protect wdAllowOnlyFormFields, True, ""
Exit Sub
EH: MsgBox ("Incorrect or missing location name")