![]() |
#1
|
|||
|
|||
![]() At work last week, a proposal document of 120-plus pages developed a problem during a computer freeze. When the computer was rebooted and the document reopened, all of the text bullets had been changed to the table bullet style, and each group of bulleted items had been placed in a frame. I found the macro below, posted in 2017 on the web, and tried to use it, selecting from just above the first set of bullets to the end of the document and running the macro. It only removed the first frame. Today, trying again, I find that the document gets busy for perhaps five seconds and then abruptly closes with no change. Since I’m not a coder, I don’t really read VBA, but this looks pretty straight-forward to me. Is there anything wrong with the macro (I’m running Office 365 on a corporate network), is the problem perhaps a network security issue preventing its execution, or might there be some other reason it would not work on this document? The only frames are those added around the bullets. There are tables and text boxes but no other frames. Thanks. Code:
Sub RemoveAllFramesInDoc() Dim objFrame As Frame Dim nFrame As Long Application.ScreenUpdating = False nFrame = ActiveDocument.Frames.Count For Each objFrame In ActiveDocument.Frames objFrame.Delete Next objFrame MsgBox ("All " & nFrame & " frames in this document have been removed!") Application.ScreenUpdating = True End Sub |
Tags |
delete all frames |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running Macro in Multiple word files | min257 | Word VBA | 3 | 02-11-2019 09:54 PM |
Cursor not showing up when running footnote macro | brent chadwick | Word VBA | 2 | 04-09-2018 05:42 PM |
![]() |
rdross51 | Word VBA | 11 | 02-27-2015 05:52 AM |
issue in running macro in mac | expert4knowledge | Word VBA | 5 | 08-13-2014 02:33 PM |
![]() |
yessmarie | Word VBA | 1 | 05-25-2012 12:04 AM |