#1
|
|||
|
|||
"Title" and "Subject" fields not possible to delete
Hi guys! Hooray for search engines that allowed me to find this forum!
So I have this issue with fields in a document I downloaded online. The document works perfectly but they are one (two) things that annoy me - fields that I cannot remove/delete. I am not quite sure if these are technically defined as fields by you professionals, but I would classify them as such.
Any idea how to delete these? Please see attached images on what it looks like (I am on a Mac, using the latest version from Office365). Also, if anyone would like enlighten me on what these are good for, please feel free |
#2
|
||||
|
||||
The fields are content controls and they appear to be locked against deletion, which is a sensible thing to do. If you cannot enter multiple lines of text then they appear to be plain text controls. You can change them to rich text which will permit formatting and multiple lines.
You can change the property of each control you wish to aqccess to remove the lock which will allow you to modify or delete it. However I am not familiar with the Mac interface and initial enquiries suggest that there is no interface to access to properties in the Mac version. All may not be lost as the Mac version can run macros and the following macro should unlock the two controls and either convert them to rich text format which will allow multiple lines or you can remove the apostrophe from the 'oCC.Delete line and the controls should be deleted. Much depends on what the Mac version will allow. Code:
Sub Macro1() Dim oCC As ContentControl For Each oCC In ActiveDocument.ContentControls Select Case oCC.TITLE Case Is = "Title", "Subject" oCC.LockContentControl = False oCC.Type = wdContentControlRichText 'oCC.Delete Case Else End Select Next oCC Set oCC = Nothing End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Thank you very much! I somehow managed to open Microsoft Visual Basic and ran your code. They are now gone!
|
#4
|
|||
|
|||
Quote:
The Enter key produces a line break. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Combine "sort within groups" and "identify duplicate/unique values" in two different variables. | civilcervant | Excel | 3 | 06-12-2017 07:27 AM |
How do I delete the names under "Exceptions" when I use the "Restrict Editing" feature in Word? | MengS | Word | 0 | 02-25-2015 02:57 PM |
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas | jocke321 | Word VBA | 2 | 12-10-2014 11:27 AM |
How do I prevent the "author" or "owner" fields from being changed? | Bones | Word | 3 | 06-08-2012 12:15 AM |
How to choose a "List" for certain "Heading" from "Modify" tool? | Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |