![]() |
#1
|
|||
|
|||
![]()
Hi
I am trying to create a macro in Word which finds the next field, selects it and then changes the background colour to no fill. I couldn't find a way of only selecting the field so it selects the whole line but that is fine, unless selecting the field on its own is easy enough? My main question is how would I look the below code? I have very limited knowledge of macros and I try and patch things together using the record function and references from the internet, so apologies for the state of the below code. HTML Code:
Sub ASelect1() ' ' ASelect1 Macro ' ' Selection.GoTo What:=wdGoToField, Name:="MergeField" Selection.HomeKey Unit:=wdLine Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.Shading.Texture = wdTextureNone Selection.Shading.ForegroundPatternColor = wdColorAutomatic Selection.Shading.BackgroundPatternColor = wdColorAutomatic End Sub Cheers |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to keep formatted form fields after mail merge or replace text with formatted form fields | jer85 | Word VBA | 2 | 04-05-2015 10:00 PM |
Repeat formula 5 times and repeat? | Jenny345 | Excel | 4 | 06-14-2013 04:37 PM |
![]() |
ypurcaro | Word | 1 | 02-07-2013 01:46 AM |
need macro for quiz (?) repeat of wrong answers with shuffle | braveshark | PowerPoint | 0 | 10-02-2012 06:10 AM |
Using fields to repeat data throughout a document | Brasada | Word | 0 | 07-20-2010 02:37 PM |