Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 07-14-2012, 12:23 AM
TTN TTN is offline Clean an Email backup file Windows XP Clean an Email backup file Office 2003
Novice
Clean an Email backup file
 
Join Date: Jul 2012
Posts: 13
TTN is on a distinguished road
Default

Word shows the MIME code to be 80 characters wide. So I tried [!^13 ]{79,80}^13 It came back none found Also I found this script on the internet that is suposed to delete any paragraph that does not have a given string.
Code:
Sub DeleteParagraphContainingString()
Dim search As String
search = " "
Dim para As Paragraph
For Each para In ActiveDocument.Paragraphs
  Dim txt As String
  txt = para.Range.Text
  If Not InStr(LCase(txt), search) Then
    para.Range.Delete
  End If
Next
End Sub
I created the macro for it and it shows as the only macro available how ever when I click on the macro to run WORD try's to run a script I tried yesterday and not the current one. I can't find any reference to the one it is trying to run. So I can't delete it either.

Last edited by macropod; 07-14-2012 at 12:29 AM. Reason: Added code tags & formatting
Reply With Quote
  #17  
Old 07-14-2012, 12:30 AM
macropod's Avatar
macropod macropod is offline Clean an Email backup file Windows 7 64bit Clean an Email backup file Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Did you use a wildcard Find/Replace (ie did you check the 'use wildcards' option)?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #18  
Old 07-14-2012, 12:35 AM
TTN TTN is offline Clean an Email backup file Windows XP Clean an Email backup file Office 2003
Novice
Clean an Email backup file
 
Join Date: Jul 2012
Posts: 13
TTN is on a distinguished road
Default

No I didn't this type of searching is new to me. I have now checked it and it is now finding lines but they don't look anything close to the MIME code. I don't see a similarity to what it is finding. It seems to be finding the first space in a line I found a reference to the wild caRD FIND FUNCTION AND AM TRYING TO UNDERSTAND IT NOW.
Reply With Quote
  #19  
Old 07-14-2012, 12:55 AM
macropod's Avatar
macropod macropod is offline Clean an Email backup file Windows 7 64bit Clean an Email backup file Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

The wildcard Find Expression I posted won't find spaces, as the [!^13 ] part tells it to ignore paragraph breaks and spaces. The numbers in the braces, tell it how many characters in the nominated sequence must be found. The final ^13 says the found sequence must be followed by a paragraph break.

With your file in Word, does each line end with a ¶ character?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #20  
Old 07-14-2012, 01:23 AM
TTN TTN is offline Clean an Email backup file Windows XP Clean an Email backup file Office 2003
Novice
Clean an Email backup file
 
Join Date: Jul 2012
Posts: 13
TTN is on a distinguished road
Default

No, since it is a code file I doubt there are any formatting or control codes. I have dissected your expression and I can get it to find any space or skip any space if I only use [!^32] or ^32. And I can find any string of 80 characters by using *{80}. But I can not get the exclusion expression to work with the 80 character expression. This is what I have right now but it is ignoring the exclusion. [!^32]*{80}
Reply With Quote
  #21  
Old 07-14-2012, 01:28 AM
macropod's Avatar
macropod macropod is offline Clean an Email backup file Windows 7 64bit Clean an Email backup file Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

If you're not seeing the ¶ character at the end of each line (even when you toggle the formatting display on/off), that means the MIME code lines are wrapped in Word. In that case, try using;
Find = ^13[!^13 ]@^13
Replace = ^p
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #22  
Old 07-14-2012, 01:39 AM
TTN TTN is offline Clean an Email backup file Windows XP Clean an Email backup file Office 2003
Novice
Clean an Email backup file
 
Join Date: Jul 2012
Posts: 13
TTN is on a distinguished road
Default

I found out why the exclusion was not being recognized. The use of the * was redundant and over rode the exclusion. It is now finding any string that is a minimum of 255 characters that does not have a space in it. The find function has a limit on the string length of 255. I have tried it manually a few times and it seems to be skipping all other strings. Let you know if I try to do it automatically.
Reply With Quote
  #23  
Old 07-14-2012, 01:48 AM
TTN TTN is offline Clean an Email backup file Windows XP Clean an Email backup file Office 2003
Novice
Clean an Email backup file
 
Join Date: Jul 2012
Posts: 13
TTN is on a distinguished road
Default

After 30 manuals I clicked replace all. My Norton utility poped up showing high CPU usage Ha Ha it may take awhile. It just finished 24326 replacements!
Reply With Quote
Reply

Tags
delete, filter, text



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot restore Outlook from backup file guyco1970 Outlook 0 03-12-2012 01:27 PM
How do i restore my backup mails to my email adsegzy Outlook 3 04-25-2011 04:00 PM
Clean an Email backup file Automated pst file backup jbarr11 Outlook 1 04-17-2011 05:28 PM
Outlook looking for backup file on startup htown Outlook 0 12-05-2010 07:32 PM
Importing .pst and backup csv file shirlthepirl Outlook 0 09-04-2009 09:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:26 AM.


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