How to remove tab characters in Powerpoint presentation Thread poster: Erik Freitag
| Erik Freitag Germany Local time: 21:38 Member (2006) Dutch to German + ...
Dear colleagues, I'm looking for a way to search tab characters and replace them with a space in Powerpoint (2010). How can I do that? I've tried ^t as a search argument, but that doesn't seem to work. Many thanks in advance, kind regards, Erik | | | Dan Lucas United Kingdom Local time: 20:38 Member (2014) Japanese to English
Erik Freitag wrote: I'm looking for a way to search tab characters and replace them with a space in Powerpoint (2010). How can I do that? I've tried ^t as a search argument, but that doesn't seem to work. I have been using this snippet for a year or two, adapted from the internet somewhere. The indentation is messed up but it shouldn't matter in VBA. Hit Alt + F11, insert a VBA module, then paste and run. Sub ReplaceTabs() Dim osld As Slide Dim oshp As Shape For Each osld In ActivePresentation.Slides For Each oshp In osld.Shapes If oshp.HasTextFrame Then 'look for newline followed by Tab and switch to SPACE With oshp.TextFrame.TextRange .Text = Replace(.Text, vbTab, " ") End With End If Next oshp Next osld End Sub | | | Erik Freitag Germany Local time: 21:38 Member (2006) Dutch to German + ... TOPIC STARTER That changes a lot of other things, too | Jan 29, 2016 |
Dear Dan, Thanks a lot. Unfortunately, that changes a lot of other things as well (at least on one slide), for example: text colour and size, bold, underlines etc. Any other ideas? Kind regards, Erik | | | Dan Lucas United Kingdom Local time: 20:38 Member (2014) Japanese to English
Erik Freitag wrote: Unfortunately, that changes a lot of other things as well (at least on one slide), for example: text colour and size, bold, underlines etc. Any other ideas? Umm. Yeah, apparently those side effects are a thing when you use replace. How annoying. Try this instead. Something else I just copied and adjusted a little. Sub ReplaceTabs() Dim oSld As Slide Dim oShp As Shape Dim oTxtRng As TextRange Dim oTmpRng As TextRange For Each oSld In ActivePresentation.Slides For Each oShp In oSld.Shapes Set oTxtRng = oShp.TextFrame.TextRange Set oTmpRng = oTxtRng.Replace(FindWhat:=vbTab, _ Replacewhat:=" ", WholeWords:=False) Do While Not oTmpRng Is Nothing Set oTxtRng = oTxtRng.Characters(oTmpRng.Start + _ oTmpRng.Length, oTxtRng.Length) Set oTmpRng = oTxtRng.Replace(FindWhat:=vbTab, _ Replacewhat:=" ", WholeWords:=False) Loop Next oShp Next oSld End Sub Regards Dan | |
|
|
Stepan Konev Russian Federation Local time: 22:38 English to Russian
1. Find any tab in your presentation. If you can't, just type it anywhere (but don't forget to delete it at the end). 2. Select the tab and press Ctrl+C 3. Press Ctrl+H 4. Tab will automatically appear in the Find field. If not, put cursor into the Find field and press Ctrl+V 5. Type space in the Replace field 6. Press Replace all
[Edited at 2016-01-29 21:09 GMT] | | | Erik Freitag Germany Local time: 21:38 Member (2006) Dutch to German + ... TOPIC STARTER Thanks to both of you! | Jan 30, 2016 |
Thanks, Stepan! Works perfectly. No idea why I didn't think of this myself. Embarrassing! @Dan: Thanks a lot for your other suggestion! I haven't tried it after reading Stepan's post... | | | Dan Lucas United Kingdom Local time: 20:38 Member (2014) Japanese to English Lateral thinking | Jan 30, 2016 |
Erik Freitag wrote: Thanks, Stepan! Works perfectly. No idea why I didn't think of this myself. Embarrassing! @Dan: Thanks a lot for your other suggestion! I haven't tried it after reading Stepan's post... I know, I blushed myself. Well done Stepan for cutting the Gordian knot. I even think he's suggested it before on the forum... Dan | | | Rolf Keller Germany Local time: 21:38 English to German Office 2007 and later provides are other ways | Jan 30, 2016 |
An Office file (2007 & later) consists of a bunch of files (text files, image files and others) that are embedded in a .zip file. So, rename .pptx to .zip, extract it and edit the appropriate text file (e. g. slide1.xml) using any text editor. Make sure to keep plain text in the .xml file. Then put slide.xml back into the .zip file and rename .zip back to .pptx. Unfortunately this method doesn't loop through all slides automatically. But it can be useful for certain o... See more An Office file (2007 & later) consists of a bunch of files (text files, image files and others) that are embedded in a .zip file. So, rename .pptx to .zip, extract it and edit the appropriate text file (e. g. slide1.xml) using any text editor. Make sure to keep plain text in the .xml file. Then put slide.xml back into the .zip file and rename .zip back to .pptx. Unfortunately this method doesn't loop through all slides automatically. But it can be useful for certain other editing tasks. It can even be used to edit pictures, provided you keep their size. ▲ Collapse | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » How to remove tab characters in Powerpoint presentation TM-Town | Manage your TMs and Terms ... and boost your translation business
Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.
More info » |
| Anycount & Translation Office 3000 | Translation Office 3000
Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.
More info » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |