Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 24, 2013, 12:52 AM   #26
Macman45
macrumors G5
 
Macman45's Avatar
 
Join Date: Jul 2011
Location: Somewhere Back In The Long Ago
Quote:
Originally Posted by JAT View Post
Turn on the mode (Show all non printing characters), so your document shows all the hidden characters as a symbol, like space and return. Then it is easier to highlight and copy them into the Advanced Replace window. Just leave the "Replace with" field blank to delete, don't put a space in there or anything, just blank. I've been doing this in Word and Excel since the early 90s, almost daily. If you do this enough, you'll get used to how it works and you won't need the mode, anymore.
This works in Office For Mac 2011 for me...I wrestled with Macro after Macro, but Word is too dumb to "get it" I was also solving a hardware issue yesterday...I'm convinced that a Macro SHOULD do this...
__________________
Thats Not All Folks
Macman45 is offline   0 Reply With Quote
Old Jan 24, 2013, 01:05 AM   #27
JAT
macrumors 603
 
Join Date: Dec 2001
Location: Mpls, MN
Quote:
Originally Posted by Macman45 View Post
This works in Office For Mac 2011 for me...I wrestled with Macro after Macro, but Word is too dumb to "get it" I was also solving a hardware issue yesterday...I'm convinced that a Macro SHOULD do this...
A macro would just use Replace to do this. You'd want an input messagebox to allow the user to enter whatever text to delete. But really, Replace has been the way to do this problem since at least v4.0 of Word/Excel in 1992. Why bother programming something that is already programmed?

It is kinda annoying that they changed the shortcut on the Mac version though. Still CTRL-H on Windows.
__________________
-- Spiky
JAT is offline   0 Reply With Quote
Old Jan 24, 2013, 01:09 AM   #28
Macman45
macrumors G5
 
Macman45's Avatar
 
Join Date: Jul 2011
Location: Somewhere Back In The Long Ago
Quote:
Originally Posted by JAT View Post
A macro would just use Replace to do this. You'd want an input messagebox to allow the user to enter whatever text to delete. But really, Replace has been the way to do this problem since at least v4.0 of Word/Excel in 1992. Why bother programming something that is already programmed?

It is kinda annoying that they changed the shortcut on the Mac version though. Still CTRL-H on Windows.
Shows just how long it's been since I used Word in any serious capacity....Now I just write letters....
__________________
Thats Not All Folks
Macman45 is offline   0 Reply With Quote
Old Jan 24, 2013, 02:40 AM   #29
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Quote:
Originally Posted by JAT View Post
Turn on the mode (Show all non printing characters), so your document shows all the hidden characters as a symbol, like space and return. Then it is easier to highlight and copy them into the Advanced Replace window. Just leave the "Replace with" field blank to delete, don't put a space in there or anything, just blank. I've been doing this in Word and Excel since the early 90s, almost daily. If you do this enough, you'll get used to how it works and you won't need the mode, anymore.
I did exactly what you have instructed. "Share" is gone but the blank line still stays there.

I'm neither an idiot nor an expert on Word, but so many different methods working for you don't work in my case. So, it's gotta be me.

Sorry guys, but I 'm giving up.

Thank you all for your time and concern.
Y'all be safe.
aoitsukinosuke is offline   0 Reply With Quote
Old Jan 24, 2013, 02:55 AM   #30
Macman45
macrumors G5
 
Macman45's Avatar
 
Join Date: Jul 2011
Location: Somewhere Back In The Long Ago
Quote:
Originally Posted by aoitsukinosuke View Post
I did exactly what you have instructed. "Share" is gone but the blank line still stays there.

I'm neither an idiot nor an expert on Word, but so many different methods working for you don't work in my case. So, it's gotta be me.

Sorry guys, but I 'm giving up.

Thank you all for your time and concern.
Y'all be safe.
One more go...Try this Macro:


The following macro should work

Sub DeleteParas()
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="connected", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With
End Sub
__________________
Thats Not All Folks
Macman45 is offline   0 Reply With Quote
Old Jan 24, 2013, 03:50 AM   #31
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Quote:
Originally Posted by Macman45 View Post
One more go...Try this Macro:


The following macro should work

Sub DeleteParas()
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="connected", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With
End Sub
Thank you MAcman45.

Am I to replace"connected" with my own word?
aoitsukinosuke is offline   0 Reply With Quote
Old Jan 24, 2013, 03:55 AM   #32
Macman45
macrumors G5
 
Macman45's Avatar
 
Join Date: Jul 2011
Location: Somewhere Back In The Long Ago
Quote:
Originally Posted by aoitsukinosuke View Post
Thank you MAcman45.

Am I to replace"connected" with my own word?
Yep
__________________
Thats Not All Folks
Macman45 is offline   0 Reply With Quote
Old Jan 24, 2013, 03:59 AM   #33
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Quote:
Originally Posted by Macman45 View Post
Yep
WOOOWWWW!
It worked like a charm.
Thank you, thank you and THANK YOU Macman45.

Now, I got to create one for every action and I'm done.

YOU DA MAN!!!
aoitsukinosuke is offline   0 Reply With Quote
Old Jan 24, 2013, 04:01 AM   #34
Macman45
macrumors G5
 
Macman45's Avatar
 
Join Date: Jul 2011
Location: Somewhere Back In The Long Ago
Quote:
Originally Posted by aoitsukinosuke View Post
WOOOWWWW!
It worked like a charm.
Thank you, thank you and THANK YOU Macman45.

Now, I got to create one for every action and I'm done.

YOU DA MAN!!!
I knew it was possible, but had to dig it out of my very old brain...Glad we got there
__________________
Thats Not All Folks
Macman45 is offline   0 Reply With Quote
Old Jan 24, 2013, 04:02 AM   #35
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Quote:
Originally Posted by Macman45 View Post
I knew it was possible, but had to dig it out of my very old brain...Glad we got there
No wonder you are a MacRumors "demi-god".
aoitsukinosuke is offline   0 Reply With Quote
Old Jan 24, 2013, 04:31 AM   #36
Macman45
macrumors G5
 
Macman45's Avatar
 
Join Date: Jul 2011
Location: Somewhere Back In The Long Ago
Quote:
Originally Posted by aoitsukinosuke View Post
No wonder you are a MacRumors "demi-god".
It's only a title.. It certainly doesn't mean I'm a genius...It was fun solving this one as I used to write a lot of high end Macro stuff years and years ago...I have no use for them now...
__________________
Thats Not All Folks
Macman45 is offline   0 Reply With Quote
Old Jan 24, 2013, 04:48 AM   #37
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Quote:
Originally Posted by Macman45 View Post
It's only a title.. It certainly doesn't mean I'm a genius...It was fun solving this one as I used to write a lot of high end Macro stuff years and years ago...I have no use for them now...
I'm having difficulty with new macros.
I created the first one "Share" and then the second one "Report". I simply copy/pasted the first script into it, clicked edit and replaced the word "share" with "report". No problem.

Then I tried to create a third one with "Respond". Copy/paste again, but when I tried to edit, it messed up the first one "Share". I definitely didn't try to edit the wrong one.

Then, I tried a few other things out of desperation and now my macros look like this.


1) What did I mess up?
2) What is the difference between Module1 and Newmacros?
Attached Thumbnails
Click image for larger version

Name:	macro.jpg
Views:	9
Size:	35.2 KB
ID:	392227  
aoitsukinosuke is offline   0 Reply With Quote
Old Jan 24, 2013, 04:54 AM   #38
Macman45
macrumors G5
 
Macman45's Avatar
 
Join Date: Jul 2011
Location: Somewhere Back In The Long Ago
Quote:
Originally Posted by aoitsukinosuke View Post
I'm having difficulty with new macros.
I created the first one "Share" and then the second one "Report". I simply copy/pasted the first script into it, clicked edit and replaced the word "share" with "report". No problem.

Then I tried to create a third one with "Respond". Copy/paste again, but when I tried to edit, it messed up the first one "Share". I definitely didn't try to edit the wrong one.

Then, I tried a few other things out of desperation and now my macros look like this.


1) What did I mess up?
2) What is the difference between Module1 and Newmacros?

I think you need to name "NewMacros" to a more appropriate name. as it is it's screwing up the others as it's applying in all macros. I'd delete that one and create another with a name. You should end up with one for each word or string you need to delete.

----------

we know we have the right macro...It's a case of getting used to working with them...You are probably way ahead of this old guy! Keep trying, it will work.
__________________
Thats Not All Folks

Last edited by Macman45; Jan 24, 2013 at 04:53 AM. Reason: Typo
Macman45 is offline   0 Reply With Quote
Old Jan 24, 2013, 04:54 AM   #39
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Quote:
Originally Posted by Macman45 View Post
I think you need to name "NewMacros" to a more appropriate name. as it is it's screwing up the others as it's applying in all macros. I'd delete that one and create another with a name. You should end up with one for each word or string you need to delete.
But that was my point exactly. I didn't give those names. Mine were simply "share" and "report". Then after I tried to add "respond", Word changed those names by itself.
aoitsukinosuke is offline   0 Reply With Quote
Old Jan 24, 2013, 04:55 AM   #40
Macman45
macrumors G5
 
Macman45's Avatar
 
Join Date: Jul 2011
Location: Somewhere Back In The Long Ago
Further reading here:

http://office.microsoft.com/en-gb/su...001019230.aspx
__________________
Thats Not All Folks
Macman45 is offline   0 Reply With Quote
Old Jan 24, 2013, 04:56 AM   #41
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Macman45 - Sorry for insisting.
I didn't read the last part of your message.

I'll keep on trying. Thank you for everything.
aoitsukinosuke is offline   0 Reply With Quote
Old Jul 5, 2014, 01:12 PM   #42
jendea
macrumors newbie
 
Join Date: Jul 2014
macros

One more go...Try this Macro:


The following macro should work

Sub DeleteParas()
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="connected", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With
End Sub

__________________
i have tried the above macro and it works with 1 line, however i would like to delete muliple lines with the same text, but the macro fails any ideas how to modifiy the above macro to achieve this?
jendea is offline   0 Reply With Quote
Old Jul 6, 2014, 11:59 AM   #43
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Quote:
Originally Posted by jendea View Post
i have tried the above macro and it works with 1 line, however i would like to delete muliple lines with the same text, but the macro fails any ideas how to modifiy the above macro to achieve this?
Do you mean you want to delete all the lines starting with a specific word, but the macro deletes only a single line instead of all?

If so, below is one of my macros deleting ALL lines in a text that start with "Recommend". You will notice the difference in the first line in bold.
Hope this helps

Sub Recommend()
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="Recommend", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With
End Sub
End Sub

Last edited by aoitsukinosuke; Jul 6, 2014 at 12:06 PM.
aoitsukinosuke is offline   0 Reply With Quote
Old Jul 6, 2014, 12:52 PM   #44
jendea
macrumors newbie
 
Join Date: Jul 2014
Hi
What I want to do is delete multiple paragraphs in a txt document with specific words the paragraph consist of 4 lines (repetitive) but the last word in the first line changes from p001 to p002 ect I have modded the macro is this correct
Line 1 I have successfully managed my team implementing the company process at all times poo1
Line 2 Proven track record for working under pressure at all times
Line 3 I am applying for the role, due to covering this for the last 4 years
Ect...

Repative line
Line 1 I have successfully managed my team implementing the company process at all times poo2
Line 2 Proven track record for working under pressure at all times
Line 3 I am applying for the role, due to covering this for the last 4 years

Sub DeleteParas()
Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="I have successfully managed my team, implementing the Company processes at all times p*^13", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="Proven track record for working and delivering under pressure,", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With

With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="I am applying for the role, due to covering this for the last 4 years", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With
End Sub

Last edited by jendea; Jul 6, 2014 at 12:57 PM.
jendea is offline   0 Reply With Quote
Old Jul 6, 2014, 05:58 PM   #45
aoitsukinosuke
Thread Starter
macrumors regular
 
Join Date: Jun 2011
Hi jendea,

What you are looking for is unfortunately beyond my knowledge. I hope someone answers and I can learn along. Sorry.

Quote:
Originally Posted by jendea View Post
Hi
What I want to do is delete multiple paragraphs in a txt document with specific words the paragraph consist of 4 lines (repetitive) but the last word in the first line changes from p001 to p002 ect I have modded the macro is this correct
Line 1 I have successfully managed my team implementing the company process at all times poo1
Line 2 Proven track record for working under pressure at all times
Line 3 I am applying for the role, due to covering this for the last 4 years
Ect...

Repative line
Line 1 I have successfully managed my team implementing the company process at all times poo2
Line 2 Proven track record for working under pressure at all times
Line 3 I am applying for the role, due to covering this for the last 4 years

Sub DeleteParas()
Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="I have successfully managed my team, implementing the Company processes at all times p*^13", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With
With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="Proven track record for working and delivering under pressure,", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With

With Selection
.HomeKey wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
While .Execute(findText:="I am applying for the role, due to covering this for the last 4 years", _
MatchWholeWord:=True)
Selection.Range.Paragraphs(1).Range.Delete
Wend
End With
End With
End Sub
aoitsukinosuke is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Applications > Mac Applications and Mac App Store

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone: need to disable "move/delete apps" option rhrony iOS 6 2 Sep 9, 2013 06:36 PM
Can find "DELETE" option on new iTunes WolverineKS iOS 6 1 Dec 15, 2012 12:51 AM
Word: Recent File "Word is unable to find the document" brentonchina Mac Applications and Mac App Store 1 Nov 13, 2012 02:56 AM
Leak - Preorder Option to Enable "Find My Iphone" nostresshere iPhone 6 Sep 7, 2012 11:05 AM
DP4: "Find" option grayed out in Notes documents Krazy Bill OS X 10.8 Mountain Lion 0 Jul 14, 2012 10:37 AM

Forum Jump

All times are GMT -5. The time now is 05:27 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC