Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 05-06-2016, 09:04 PM
gmayor's Avatar
gmayor gmayor is offline Disable email function of command button if all form fields are not completed Windows 10 Disable email function of command button if all form fields are not completed Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
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

Presumably this relates to your other thread, in which case, immediately after the DIM statements at the top of the macro, enter or copy the following.
Code:
Dim oFF As FormField

    For Each oFF In ActiveDocument.FormFields
        If oFF.Result = "" Then
            oFF.Select
            MsgBox "Field cannot be left empty"
            GoTo lbl_Exit
        End If
    Next oFF
__________________
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable email function of command button if all form fields are not completed Email from Command Button derajlance Word VBA 6 05-05-2016 07:40 AM
Submit to Email Command Button rob7676 Word VBA 0 08-20-2015 05:05 AM
Disable email function of command button if all form fields are not completed command button that generates a popup for sending email oduntan Word VBA 4 03-21-2013 02:15 PM
Disable email function of command button if all form fields are not completed Command button - save in temp folder and send email with attachment bigbird69 Word VBA 13 11-18-2012 10:06 PM
Disable email function of command button if all form fields are not completed Word VBA: How to create a command button and trigger a function? tinfanide Word VBA 2 12-02-2011 05:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:26 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