Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
So I am trying to create and office memo template and as part of this based on what the memo is for, the user of the form selects the purpose and it changes the background color of the document.
So I created a Drop-Down List Content Control Named "BackgroundColor" with the Values "Blue" and "Green" for 2 different purposes. I then wrote a VBA Macro as follows Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) ActiveDocument.Unprotect With ActiveDocument Select Case ActiveDocument.ContentControls("BackgroundColor") Case "Blue" ActiveDocument.ActiveWindow.View.DisplayBackground s = True ActiveDocument.Background.Fill.ForeColor.RGB = RGB(200, 200, 200) ActiveDocument.Background.Fill.Transparency = 0# ActiveDocument.Background.Fill.PresetTextured msoTextureParchment Case "Green" ActiveDocument.ActiveWindow.View.DisplayBackground s = True ActiveDocument.Background.Fill.ForeColor.RGB = RGB(100, 100, 100) ActiveDocument.Background.Fill.Transparency = 0# ActiveDocument.Background.Fill.PresetTextured msoTextureParchment Case Else End Select ActiveDocument.Protect wdAllowOnlyFormFields, True End With End Sub The Macro fails with Invalid Parameter. Anyone have any idea how to fix it? I am on Office Professional Plus 2016 Last edited by WordNoob : August 20th 18 at 04:58 PM |
#2
![]() |
|||
|
|||
![]()
Instagram is among a breed of smartphone apps which have tapped into the creative, image-based online life of young people. Click Instagram video downloader free.
|
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
document map background color (W 2003) | Microsoft Word Help | |||
color background in a document | Page Layout | |||
The background color won't print with my document. | Microsoft Word Help | |||
background color for text document | New Users | |||
Background color on only one page of a document | Microsoft Word Help |