Hello
My Word document has a drop down box which includes 9 different choices.
There is an image associated with each choice. Would it be possible to display the image, on the page as a result of the choice made in the drop down?
Thanks
Graeme
Drop Down Box
-
- Cosmic Lounger
- Posts: 1250
- Joined: 11 Feb 2010, 12:23
- Location: Medway, Kent, UK
-
- 5StarLounger
- Posts: 635
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: Drop Down Box
Yes. I am assuming that the drop down is a Content Control.
See the links provided by macropod (Paul Edstein) in this thread.
https://www.msofficeforums.com/166772-post4.html
Rather than text, you would be inserting an image.
The images could be separate files using an IncludePicture or the equivalent command or could be stored in a template as AutoText entries.
See the links provided by macropod (Paul Edstein) in this thread.
https://www.msofficeforums.com/166772-post4.html
Rather than text, you would be inserting an image.
The images could be separate files using an IncludePicture or the equivalent command or could be stored in a template as AutoText entries.
Last edited by Charles Kenyon on 08 Aug 2023, 16:37, edited 1 time in total.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- Cosmic Lounger
- Posts: 1250
- Joined: 11 Feb 2010, 12:23
- Location: Medway, Kent, UK
Re: Drop Down Box
Thanks for your response Charles.
I'll have another good read through your link after another coffee.
Graeme
I'll have another good read through your link after another coffee.
Graeme
-
- Cosmic Lounger
- Posts: 1250
- Joined: 11 Feb 2010, 12:23
- Location: Medway, Kent, UK
Re: Drop Down Box
Charles Kenyon wrote: ↑08 Aug 2023, 01:53Yes. I am assuming that the drop down is a Content Control.
Yes it is. The document is an astronomy Certificate of of achievement. There are 9 categories so there are 9 items to chose from in the Drop down. The selection just inserts the category name text at the location of the drop down chooser.
I would like the choice to place the text and also place a linked image. Just the image somewhere on the page or a watermark, I'm not fussed. I've searched but can't find anything that explains how to do this, is it possible?
Your links appear to be related to interdependent combo boxes. I had these in an Access database I compiled in a previous life but that's not what I'm after in this instance.
Graeme
-
- 4StarLounger
- Posts: 596
- Joined: 14 Nov 2012, 16:06
Re: Drop Down Box
You can use a combination of a ContentControl, an 'IF"- field, a 'DocVariable"-field and an "IncludePicture"-field
You do not have the required permissions to view the files attached to this post.
-
- Cosmic Lounger
- Posts: 1250
- Joined: 11 Feb 2010, 12:23
- Location: Medway, Kent, UK
Re: Drop Down Box
Perfect!
Thanks snb.
Regards
Graeme
Thanks snb.
Regards
Graeme
-
- 4StarLounger
- Posts: 596
- Joined: 14 Nov 2012, 16:06
Re: Drop Down Box
Simpler approach:
{ IF {Docvariable pict} ="" "" {Includepicture {Docvariable pict}}}
{ IF {Docvariable pict} ="" "" {Includepicture {Docvariable pict}}}
Code: Select all
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
ThisDocument.Variables("pict") = "G:\OF\" & ContentControl.Range & ".jpg"
ThisDocument.Fields.Update
End Sub