Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-01-2018, 02:23 PM
jtwite jtwite is offline Macro to protect document leaves brackets where the cursor is Windows 10 Macro to protect document leaves brackets where the cursor is Office 2010 64bit
Novice
Macro to protect document leaves brackets where the cursor is
 
Join Date: Mar 2018
Posts: 6
jtwite is on a distinguished road
Default Macro to protect document leaves brackets where the cursor is

Hello,

I have a issue that I just cannot find an answer to. I have some macros set up to protect a document in track changes and to protect a document for filling in forms. I activate the macro using a keyboard combination. The macros work fine, but wherever my cursor is when I hit the keyboard combination it leave a gray bar, or brackets if you type anything. Here is the code that I am using:

Sub Fillable ()
'

'Fillable Macro
'
Selection.Editors.Add wdEditorEveryone
ActiveDocument.Protect Password:="", Type:=_
wdAllowOnlyFormFields



End Sub

Any help would be greatly appreciated.
Reply With Quote
  #2  
Old 03-01-2018, 08:35 PM
macropod's Avatar
macropod macropod is offline Macro to protect document leaves brackets where the cursor is Windows 7 64bit Macro to protect document leaves brackets where the cursor is Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

I suspect what you're seeing is nothing more than formfield bookmark boundaries. You can toggle their display on/off via File|Options|Advanced>Show document content>Show bookmarks.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-01-2018, 08:51 PM
jtwite jtwite is offline Macro to protect document leaves brackets where the cursor is Windows 10 Macro to protect document leaves brackets where the cursor is Office 2010 64bit
Novice
Macro to protect document leaves brackets where the cursor is
 
Join Date: Mar 2018
Posts: 6
jtwite is on a distinguished road
Default

Thank you for the reply, but that doesn't seem to be it. I checked that setting and show bookmarks is not checked. I think it has something to do with creating an editable area, but I don't know for sure.
Reply With Quote
  #4  
Old 03-01-2018, 08:52 PM
macropod's Avatar
macropod macropod is offline Macro to protect document leaves brackets where the cursor is Windows 7 64bit Macro to protect document leaves brackets where the cursor is Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Without actually seeing the problem document, it can be difficult for anyone to diagnose the issue. Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 03-01-2018, 08:58 PM
jtwite jtwite is offline Macro to protect document leaves brackets where the cursor is Windows 10 Macro to protect document leaves brackets where the cursor is Office 2010 64bit
Novice
Macro to protect document leaves brackets where the cursor is
 
Join Date: Mar 2018
Posts: 6
jtwite is on a distinguished road
Default

OK, thanks. This is a problem I am having at work so when I get in to the office tomorrow I will attach a document. I really appreciate the help.
Reply With Quote
  #6  
Old 03-02-2018, 09:30 AM
jtwite jtwite is offline Macro to protect document leaves brackets where the cursor is Windows 10 Macro to protect document leaves brackets where the cursor is Office 2010 64bit
Novice
Macro to protect document leaves brackets where the cursor is
 
Join Date: Mar 2018
Posts: 6
jtwite is on a distinguished road
Default

I have attached a test document so you can see what is happening. I have three macros setup that run with keyboard combinations. They are:

Ctrl + u unprotects the document when it is protected
Ctrl + l protects the document with track changes
Ctrl + k protects the document with just being able to fill in forms.

The unprotect one works fine. The other two work, but wherever the cursor is when you hit the keyboard combination it leaves that bar. The bar does not show up when printed the doc is printed, however it does show up when I convert the doc to a PDF which I have to do sometimes. The only way to get rid of the bar is to put my cursor on it and type something and then highlight it and delete it. If I just manually go in and protect the documents by typing in the password that bar does not show up. But I don't want to type that password 100+ times a day.

Thanks for the help.
Attached Files
File Type: docx Macro test.docx (12.6 KB, 10 views)
Reply With Quote
  #7  
Old 03-04-2018, 12:47 AM
macropod's Avatar
macropod macropod is offline Macro to protect document leaves brackets where the cursor is Windows 7 64bit Macro to protect document leaves brackets where the cursor is Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

As I suspected:
Quote:
Originally Posted by macropod View Post
what you're seeing is nothing more than formfield bookmark boundaries.
And, as I also said:
Quote:
Originally Posted by macropod View Post
You can toggle their display on/off via File|Options|Advanced>Show document content>Show bookmarks.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 03-04-2018, 07:02 AM
jtwite jtwite is offline Macro to protect document leaves brackets where the cursor is Windows 10 Macro to protect document leaves brackets where the cursor is Office 2010 64bit
Novice
Macro to protect document leaves brackets where the cursor is
 
Join Date: Mar 2018
Posts: 6
jtwite is on a distinguished road
Default

Did that work for you on the document that I uploaded, because it doesn't work for me. We are pretty locked down at my office so maybe our IT department is locking something down that is causing this The moment I hit the keyboard combination as posted, that bar shows up. Is there something I can put in the VBA code to stop that bar from showing up? I will try again, but whenever I go into that setting the show bookmarks is not checked. This never used to happen, but that was probably with an older version of Word.
Reply With Quote
  #9  
Old 03-04-2018, 01:57 PM
macropod's Avatar
macropod macropod is offline Macro to protect document leaves brackets where the cursor is Windows 7 64bit Macro to protect document leaves brackets where the cursor is Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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 jtwite View Post
Did that work for you on the document that I uploaded, because it doesn't work for me.
Of course it did; I wouldn't have written post 7 otherwise.
Quote:
Originally Posted by jtwite View Post
We are pretty locked down at my office so maybe our IT department is locking something down that is causing this ... Is there something I can put in the VBA code to stop that bar from showing up?
If it's 'locked down' as you say, you won't be able to do anything; otherwise you might use:
ActiveWindow.View.ShowBookmarks = False
but, if that works, so too would unchecking the 'Show bookmarks' option.
Quote:
Originally Posted by jtwite View Post
This never used to happen, but that was probably with an older version of Word.
Word has had that setting for at least two decades.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 03-04-2018, 02:04 PM
jtwite jtwite is offline Macro to protect document leaves brackets where the cursor is Windows 10 Macro to protect document leaves brackets where the cursor is Office 2010 64bit
Novice
Macro to protect document leaves brackets where the cursor is
 
Join Date: Mar 2018
Posts: 6
jtwite is on a distinguished road
Default

I will experiment with the toggle and that VBA code some. Thanks for the help, it is greatly appreciated. It seems like this started happening when we switched to Office 10 and I had to redo the macro. I don't really know what I am doing with the macros and VBA so I'm sure I just did something slightly differently when I set up the macros this time. Again, thanks for the help.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to protect document leaves brackets where the cursor is find and delet all text within brackets and the brackets themselves wrdy Word 2 08-03-2017 06:55 PM
editable and protect document soninha Word 1 03-30-2015 12:20 PM
Macro to protect document leaves brackets where the cursor is Brackets around entire contents of document Susan Carol Word 5 02-01-2015 08:55 PM
Macro to protect document leaves brackets where the cursor is Password Protect a Macro Mark212 Word VBA 2 01-14-2015 02:30 PM
Why does Word 2007 open my document with {SEQ ...} brackets? Ferenc Nagy Word 4 02-28-2013 11:20 AM

Other Forums: Access Forums

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