Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-16-2022, 05:57 AM
gmayor's Avatar
gmayor gmayor is offline Checking whether the selected lies with in an equation field Windows 10 Checking whether the selected lies with in an equation field Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
 

Thread Tools
Display Modes


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
Checking whether the selected lies with in an equation field 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
Checking whether the selected lies with in an equation field Word Equation field codes mkarthic Word 1 12-02-2011 02:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft