Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-15-2014, 05:15 AM
macropod's Avatar
macropod macropod is offline first character NOT Alpha numeric or Tilde (~) delete. Windows 7 32bit first character NOT Alpha numeric or Tilde (~) delete. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
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

Try:


Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
  .InsertBefore vbCr
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "^13[A-Za-z0-9~]"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
    .Text = "^13[!A-Za-z0-9~] "
    .Replacement.Text = "^p"
    .Execute Replace:=wdReplaceAll
  End With
  .Characters.First = vbNullString
End With
Application.ScreenUpdating = True
End Sub
If the above doesn't do what you want, please attach a document to a post with some representative before and after data (delete anything sensitive). You do this via the paperclip symbol on the 'Go Advanced' tab - don't simply post more code that doesn't work.

PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
delete first character



Similar Threads
Thread Thread Starter Forum Replies Last Post
first character NOT Alpha numeric or Tilde (~) delete. How to do an alpha numeric Sort By? Opul3nce Excel 1 10-15-2012 11:11 PM
first character NOT Alpha numeric or Tilde (~) delete. Unique 3 char Alpha Numberic column mauricioaglr Excel 7 03-09-2012 06:45 PM
first character NOT Alpha numeric or Tilde (~) delete. Word 2007 TOC Section Number w/Alpha Prefix? Gwen Butler Office 2 09-29-2011 06:10 AM
first character NOT Alpha numeric or Tilde (~) delete. Place pages in alpha order. Wskip49 Word 5 08-28-2011 07:54 PM
first character NOT Alpha numeric or Tilde (~) delete. [How To] Generate Alpha Numeric Values in Excel 2010 stnicholas81 Excel 1 07-25-2011 01:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft