Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2022, 08:53 PM
elaineAda elaineAda is offline Need help in content control Windows XP Need help in content control Office 2010
Novice
Need help in content control
 
Join Date: Mar 2019
Posts: 25
elaineAda is on a distinguished road
Default Need help in content control


I have many content control boxes in my form. Can a macro help in ensuring all the content control boxes are completed before the user save the file?
Reply With Quote
  #2  
Old 04-16-2022, 06:59 AM
macropod's Avatar
macropod macropod is offline Need help in content control Windows 10 Need help in content control Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For example:
Code:
Private Sub AutoClose()
Dim CCtrl As ContentControl, Cancel As Boolean: Cancel = False
With ActiveDocument
  For Each CCtrl In .ContentControls
    If CCtrl.ShowingPlaceholderText = True Then Cancel = True: CCtrl.Range.Select: Exit For
  Next
  If Cancel = True Then
    MsgBox "Please complete all the items"
    .Saved = False
    SendKeys "{ESC}"
  End If
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-16-2022, 07:31 AM
macropod's Avatar
macropod macropod is offline Need help in content control Windows 10 Need help in content control Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Cross-posted at: Macro for saving a macro enabled file to a non macro file
For cross-posting etiquette, please read: Excelguru Help Site - A message to forum cross posters
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 04-17-2022, 01:58 AM
elaineAda elaineAda is offline Need help in content control Windows XP Need help in content control Office 2010
Novice
Need help in content control
 
Join Date: Mar 2019
Posts: 25
elaineAda is on a distinguished road
Default

Ops i didnt know is the same forum.
Anyway thanks a lot, it helps
Reply With Quote
  #5  
Old 04-17-2022, 05:37 AM
macropod's Avatar
macropod macropod is offline Need help in content control Windows 10 Need help in content control Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by elaineAda View Post
i didnt know is the same forum.
The whole point is that they are NOT the same forum...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help in content control Change Value of a Content Control based on the value of another content Control jsc_msoffice Word VBA 2 05-21-2021 09:51 PM
Need help in content control Content Control Dropdowns - How to duplicate the content control and allow a second choice ashleyf Word VBA 2 03-19-2020 09:11 AM
Content Control content deleted when re-uploading to SharePoint Peterson Word 5 06-27-2018 08:13 PM
Need help in content control Clicking the selected Content Control checkbox returns wrong control in vba event DougsGraphics Word VBA 2 06-24-2015 07:31 AM
Need help in content control Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:07 AM.


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