![]() |
|
#2
|
||||
|
||||
|
Your question is short on context, but maybe
Code:
Function InField(sText As String) As Boolean
If Selection.Fields.Count > 0 Then
If Selection.Fields(1).Type = wdFieldFormula Then
If InStr(1, Selection.Fields(1).Code, sText) > 1 Then InField = True
End If
End If
End Function
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Activate (show) a Drop-down form field when another drop-down form field is selected from | Jentis | Word VBA | 1 | 04-19-2018 09:42 PM |
| Need a VBA func. that tells if a point lies above/below 3D polygon surface | gonurvia | Excel Programming | 0 | 03-29-2017 01:40 AM |
Get Name of Selected/Active Form Field
|
NumberCruncher | Word VBA | 8 | 01-20-2014 11:36 PM |
| Insert an image that lies in two rows | raistlin | Word | 1 | 03-10-2013 02:11 PM |
Word Equation field codes
|
mkarthic | Word | 1 | 12-02-2011 02:09 AM |