#16
|
|||
|
|||
Unfortunately that Macro doesn't seem to work either. I'm not entirely sure how to share a snippet of the document that includes the images I want removed. Can you advise on how this may be done? |
#17
|
||||
|
||||
In a reply window in the forum, click the Advanced button (below the text field), if you can't see any options for file attachments. After you have activated the "Advanced" view, you should see options for attaching files. You will have to make a copy of your original document, of course, and remove most of the content from the copy. Just leave the mysterious objects and some "dummy" text. Attach the *.docx file.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#18
|
|||
|
|||
Quote:
|
#19
|
|||
|
|||
I think that snippet of my Word Doc is attached. I have been working with RFT files, but that wasn't an option for upload.
It seems the same situation exists in .docx documents, so that is what I have attached. The thin line at the top of the first page [page 2A in the document] is a graphic, as is the line on the second page, which looks to be part of the same graphic as the mark above the words "sheriff's officers". |
#20
|
|||
|
|||
The line in your sample is a graphic (a line). In fact, it is two lines, one atop the other!
Clicking on it gives me shape controls. If I go to the Selection Pane I see both lines and can select one or the other. |
#21
|
|||
|
|||
Thanks for the reply. I'm aware that the lines are a graphic. What I'm trying to figure out is how I remove the graphics (including the lines) from the entire 3,000 page document.
|
#22
|
|||
|
|||
It is really very simple. You just need to make a simple modification to the code that you already have.
Code:
Sub DeleteAllShapes() Dim oShape As Shape Dim i As Integer For i = ActiveDocument.Shapes.Count To 1 Step -1 ActiveDocument.Shapes(i).Delete Next i For i = ActiveDocument.InlineShapes.Count To 1 Step -1 ActiveDocument.InlineShapes(i).Delete Next i End Sub |
#23
|
||||
|
||||
Good catch. It appears that most of us overlooked the reference to pictures which the original macro is testing for. In other words, the original code will delete a subset of shape objects.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional Last edited by Stefan Blom; 04-03-2024 at 04:57 AM. |
#24
|
|||
|
|||
Thanks for everyone's help and apologies it has taken me a while to reply.
I am not able to upload a small portion of the document to the forum as I can tell. This is because it is a .RTF file. As far as I can see that file format isn't supported for uploads. I have uploaded a piece of the document as a .docx document. Maybe that will help get to the bottom of this issue once and for all. |
#25
|
||||
|
||||
The code posted by Italophile in https://www.msofficeforums.com/180459-post22.html removes the graphic from your sample doc.
Perhaps you need to convert the RTF to docx before running the macro.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#26
|
|||
|
|||
Thanks once more. Yes, the code did end up working!!!
I'm so happy. |
#27
|
|||
|
|||
Quote:
My original question was about getting rid of errant tab marks. I am still having that problem. I tried Guessed's recommendation to use "^13([a-z]" with wildcards on and replace it with " \1" but it didn't find any. I tried using "^13([a-z]" and even replacing it with nothing, but it just couldn't find any references to that at all. I saw online that I could try in the Home tab opening up the paragraph dialogue box and hitting the tab button and clearing all. That didn't seem to help at all, either. |
#28
|
||||
|
||||
A tab is ^t
A paragraph mark is ^p A tab at the start of a new paragraph is ^p^t
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Indentations in Mail and Calendar for Windows 10 | Mr M | Windows | 0 | 06-20-2018 07:01 AM |
Removing indentations at beginning of paragraphs and replacing with line spaces | captainamerica | Word | 2 | 10-27-2017 05:32 PM |
Interpreting special characters as bullets and indentations | burry01 | Word | 1 | 01-18-2016 12:24 AM |
Bullet indentations unexpected change | richard hans | Word | 2 | 01-15-2014 05:14 PM |
Word indentations | mepossem | Word | 2 | 10-07-2013 10:02 AM |