Is there a way to do a find/replace in ppt to find the lines that have on them and delete the plus the line feed or carriage return? The will always appear on a line by itself. thanks
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
find/replace with carriage return (ppt xp)
Home » Forums » AskWoody support » Productivity software by function » MS PowerPoint and presentation apps » find/replace with carriage return (ppt xp)
- This topic has 13 replies, 4 voices, and was last updated 21 years, 8 months ago.
Viewing 0 reply threadsAuthorReplies-
WBell
AskWoody_MVPJuly 14, 2003 at 7:19 pm #693537Without resorting to VBA, it appears there isn’t a good way to do this and select the “paragraph” character as well. You can do the delete, but unless it’s the last line of the text area, a blank line remains. Fortunately, the Find/Replace doesn’t use wildcard characters, although the VBA version does.
-
WSjha900
AskWoody Lounger -
WSjscher2000
AskWoody LoungerJuly 15, 2003 at 3:32 am #693623VBA could look like this:
Sub testClearPara() ClearPara strTarget:="$" End Sub Sub ClearPara(strTarget As String) ' Replace matching paragraphs with nothing Dim sld As Slide, shp As Shape, intCount As Integer, para As TextRange For Each sld In ActivePresentation.Slides For Each shp In sld.Shapes If shp.HasTextFrame Then If shp.TextFrame.TextRange.Paragraphs.Count > 0 Then ' More than one paragraph; loop backwards For intCount = shp.TextFrame.TextRange.Paragraphs.Count _ To 1 Step -1 Set para = shp.TextFrame.TextRange.Paragraphs(intCount) If intCount = shp.TextFrame.TextRange.Paragraphs.Count Then ' No trailing CR+LF to match; leaves a blank bullet If para.Text = strTarget Then para.Delete End If Else If para.Text = strTarget & Chr(13) & Chr(10) Then para.Delete End If End If Next End If End If Next Next End Sub
Or maybe there’s a simpler way, but this seems to work okay for identical matches.
-
WSjha900
AskWoody LoungerAugust 31, 2003 at 8:51 pm #708589Thank you for this code. It is working fine. It just takes a while to go through the 80 slides. Is there a way i can limit it to just slides 35 to 46? Also, i tried recording a find/replace and no code was generated. I want to search for in slides 1 to 80 and replace it with 2003. Thank you for the help.
-
WSHansV
AskWoody Lounger -
WSjha900
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSjscher2000
AskWoody LoungerSeptember 1, 2003 at 10:18 pm #708991> Do you know the code to search/replace from an excel macro to powerpoint?
You want to search inside a presentation file from inside Excel? Your best bet is to write and debug the code in a PPT first, and then figure out how to run it from Excel. What sometimes happens is that object names exist in both applications’ object models and cause confusion, and those might need to be qualified with the application name. But first see if you can write the code in PPT.
-
WSjscher2000
AskWoody LoungerSeptember 1, 2003 at 10:18 pm #708992> Do you know the code to search/replace from an excel macro to powerpoint?
You want to search inside a presentation file from inside Excel? Your best bet is to write and debug the code in a PPT first, and then figure out how to run it from Excel. What sometimes happens is that object names exist in both applications’ object models and cause confusion, and those might need to be qualified with the application name. But first see if you can write the code in PPT.
-
WSjha900
AskWoody Lounger -
WSHansV
AskWoody Lounger
-
-
WSjha900
AskWoody LoungerAugust 31, 2003 at 8:51 pm #708590Thank you for this code. It is working fine. It just takes a while to go through the 80 slides. Is there a way i can limit it to just slides 35 to 46? Also, i tried recording a find/replace and no code was generated. I want to search for in slides 1 to 80 and replace it with 2003. Thank you for the help.
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Xfinity home internet
by
MrJimPhelps
4 hours, 29 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
6 hours, 29 minutes ago -
Debian 12.11 released
by
Alex5723
14 hours, 55 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
18 hours, 36 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
22 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
15 hours, 4 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
1 day, 11 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
1 day, 1 hour ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 14 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
1 day, 6 hours ago -
Some advice for managing my wireless internet gateway
by
LHiggins
14 hours ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
6 hours, 52 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
1 day, 23 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 19 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
1 day, 10 hours ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
2 days, 13 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
21 hours, 35 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
10 hours, 14 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 16 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 16 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
2 days, 4 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
3 days ago -
0Patch, where to begin
by
cassel23
2 days, 18 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
3 days, 14 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
3 days, 1 hour ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 22 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
3 days, 13 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
15 hours, 50 minutes ago -
Installer program can’t read my registry
by
Peobody
7 hours, 44 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
3 days, 11 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.