Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2020, 11:07 AM
SoMany SoMany is offline Copy everything except pictures? Windows 7 64bit Copy everything except pictures? Office 2016
Advanced Beginner
Copy everything except pictures?
 
Join Date: Oct 2016
Posts: 51
SoMany is on a distinguished road
Default Copy everything except pictures?

I have many pictures in the background of my document and want to copy the text and tables only. I can see the option to paste text only, but not the option to past text and tables. Is there a way to remove all pictures and keep both text and tables?
Reply With Quote
  #2  
Old 04-18-2020, 12:51 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Copy everything except pictures? Windows 10 Copy everything except pictures? Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,902
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

You could make a copy of the document and then run a macro which removes all images, shapes and objects.


Code:
Sub RemoveAllObjectsFromFile()
'Macro created by Stefan Blom, MVP, April 2020
Dim ShapeCount As Long
Dim InlineShapeCount As Long
Dim i As Long
Dim j As Long
ShapeCount = ActiveDocument.Shapes.Count
InlineShapeCount = ActiveDocument.InlineShapes.Count
For i = ShapeCount To 1 Step -1
ActiveDocument.Shapes(i).Delete
Next i
For j = InlineShapeCount To 1 Step -1
ActiveDocument.InlineShapes(j).Delete
Next j
End Sub
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #3  
Old 04-18-2020, 04:12 PM
macropod's Avatar
macropod macropod is offline Copy everything except pictures? Windows 7 64bit Copy everything except pictures? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Simpler and faster:
Code:
Sub RemoveAllObjectsFromFile()
Application.ScreenUpdating = False
With ActiveDocument
  While .Shapes.Count > 0: .Shapes(1).Delete: Wend
  While .InlineShapes.Count > 0: .InlineShapes(1).Delete: Wend
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 04-19-2020, 08:26 PM
SoMany SoMany is offline Copy everything except pictures? Windows 7 64bit Copy everything except pictures? Office 2016
Advanced Beginner
Copy everything except pictures?
 
Join Date: Oct 2016
Posts: 51
SoMany is on a distinguished road
Default

Thank you. I now have a macro question though. Since I didn't know how to add a macro that is written, I recorded one, then edited it. After modifying my macro, the macro stopped working. So I opened 'Customized Quick Access Tool Bar' --> More Commands --> Macros --> then added that macro with a custom button.

From there it worked, but what should I have done to record and run this macro?
Reply With Quote
  #5  
Old 04-19-2020, 08:40 PM
macropod's Avatar
macropod macropod is offline Copy everything except pictures? Windows 7 64bit Copy everything except pictures? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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 PC macro installation & usage instructions, see: Installing Macros
For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change multiple pictures in Word 2016 to all new pictures that appear in a specified order? chaz Word VBA 7 07-11-2018 03:57 AM
Copy everything except pictures? Printer issue (and copy/paste): some pictures/text are not printed/showed Jazz43 Drawing and Graphics 15 08-29-2016 04:17 AM
Copy everything except pictures? copy a page or pages in word with inserted pictures. datakop Word 2 04-03-2015 06:15 AM
PowerPoint Macro - Copy and Replace pictures from one PPT to another PPT mrayncrental PowerPoint 2 06-09-2014 02:52 AM
Copy picture style to all pictures in a presentation Gary Drumm PowerPoint 2 04-18-2013 10:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:54 PM.


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