Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
dogwoodnc dogwoodnc is offline
external usenet poster
 
Posts: 33
Default Finding All Words with Specific Format -- via Macro

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank document

I've been able to do this manually (via Find/ Highlight All Occurrences/
Format(Font)/ Find All/ Copy/ New Doc/ Paste). However, I have not been able
to get a macro to contain these commands.

Any suggestions??

THANKS in advance!
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
dogwoodnc dogwoodnc is offline
external usenet poster
 
Posts: 33
Default Finding All Words with Specific Format -- via Macro

I forgot to mention -- we're using Word 2003, with XP operating system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank document

I've been able to do this manually (via Find/ Highlight All Occurrences/
Format(Font)/ Find All/ Copy/ New Doc/ Paste). However, I have not been able
to get a macro to contain these commands.

Any suggestions??

THANKS in advance!

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Finding All Words with Specific Format -- via Macro

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
dogwoodnc dogwoodnc is offline
external usenet poster
 
Posts: 33
Default Finding All Words with Specific Format -- via Macro

THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!




  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Finding All Words with Specific Format -- via Macro

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!





  #6   Report Post  
Posted to microsoft.public.word.docmanagement
dogwoodnc dogwoodnc is offline
external usenet poster
 
Posts: 33
Default Finding All Words with Specific Format -- via Macro

This macro worked BEAUTIFULLY for us in Word 2003. However, we're now
preparing to migrate to 2007, and when I try to run it there, it does not
locate any file names (even though there ARE folders in the files). Are
there any tweaks needed for use with 2007?

Thanks in advance!



"Graham Mayor" wrote:

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!




  #7   Report Post  
Posted to microsoft.public.word.docmanagement
dogwoodnc dogwoodnc is offline
external usenet poster
 
Posts: 33
Default Finding All Words with Specific Format -- via Macro

This macro worked BEAUTIFULLY for us in Word 2003. However, we're now
preparing to migrate to 2007, and when I try to run it there, it does not
locate any file names (even though there ARE folders in the files). Are
there any tweaks needed for use with 2007?

Thanks in advance!



"Graham Mayor" wrote:

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!




  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Finding All Words with Specific Format -- via Macro

The macro in the post you referred to does not have anything to do with
files nor folders. It simply searches the current document for blue coloured
text and writes any such text found to a new document. That should work just
as readily in Word 2007 as it does in Word 2003. Can you clarify what yoiu
are trying to do?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Dogwoodnc" wrote in message
...
This macro worked BEAUTIFULLY for us in Word 2003. However, we're now
preparing to migrate to 2007, and when I try to run it there, it does not
locate any file names (even though there ARE folders in the files). Are
there any tweaks needed for use with 2007?

Thanks in advance!



"Graham Mayor" wrote:

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!






  #9   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Finding All Words with Specific Format -- via Macro

The macro in the post you referred to does not have anything to do with
files nor folders. It simply searches the current document for blue coloured
text and writes any such text found to a new document. That should work just
as readily in Word 2007 as it does in Word 2003. Can you clarify what yoiu
are trying to do?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Dogwoodnc" wrote in message
...
This macro worked BEAUTIFULLY for us in Word 2003. However, we're now
preparing to migrate to 2007, and when I try to run it there, it does not
locate any file names (even though there ARE folders in the files). Are
there any tweaks needed for use with 2007?

Thanks in advance!



"Graham Mayor" wrote:

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!






  #10   Report Post  
Posted to microsoft.public.word.docmanagement
dogwoodnc dogwoodnc is offline
external usenet poster
 
Posts: 33
Default Finding All Words with Specific Format -- via Macro

So sorry, I'm trying to troubleshoot a lot of different macros and was
thinking about another one when I wrote.

I just tried re-copying the original code and it worked perfectly. I'm not
sure why it was acting up previously.

Thanks for your patience; this one seems to be solved now!



"Graham Mayor" wrote:

The macro in the post you referred to does not have anything to do with
files nor folders. It simply searches the current document for blue coloured
text and writes any such text found to a new document. That should work just
as readily in Word 2007 as it does in Word 2003. Can you clarify what yoiu
are trying to do?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Dogwoodnc" wrote in message
...
This macro worked BEAUTIFULLY for us in Word 2003. However, we're now
preparing to migrate to 2007, and when I try to run it there, it does not
locate any file names (even though there ARE folders in the files). Are
there any tweaks needed for use with 2007?

Thanks in advance!



"Graham Mayor" wrote:

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!





.



  #11   Report Post  
Posted to microsoft.public.word.docmanagement
dogwoodnc dogwoodnc is offline
external usenet poster
 
Posts: 33
Default Finding All Words with Specific Format -- via Macro


So sorry, I'm trying to troubleshoot a lot of different macros and was
thinking about another one when I wrote.

I just tried re-copying the original code and it worked perfectly. I'm not
sure why it was acting up previously.

Thanks for your patience; this one seems to be solved now!



"Graham Mayor" wrote:

The macro in the post you referred to does not have anything to do with
files nor folders. It simply searches the current document for blue coloured
text and writes any such text found to a new document. That should work just
as readily in Word 2007 as it does in Word 2003. Can you clarify what yoiu
are trying to do?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Dogwoodnc" wrote in message
...
This macro worked BEAUTIFULLY for us in Word 2003. However, we're now
preparing to migrate to 2007, and when I try to run it there, it does not
locate any file names (even though there ARE folders in the files). Are
there any tweaks needed for use with 2007?

Thanks in advance!



"Graham Mayor" wrote:

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!





.

  #12   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Finding All Words with Specific Format -- via Macro

No problem

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Dogwoodnc" wrote in message
...
So sorry, I'm trying to troubleshoot a lot of different macros and was
thinking about another one when I wrote.

I just tried re-copying the original code and it worked perfectly. I'm
not
sure why it was acting up previously.

Thanks for your patience; this one seems to be solved now!



"Graham Mayor" wrote:

The macro in the post you referred to does not have anything to do with
files nor folders. It simply searches the current document for blue
coloured
text and writes any such text found to a new document. That should work
just
as readily in Word 2007 as it does in Word 2003. Can you clarify what
yoiu
are trying to do?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Dogwoodnc" wrote in message
...
This macro worked BEAUTIFULLY for us in Word 2003. However, we're now
preparing to migrate to 2007, and when I try to run it there, it does
not
locate any file names (even though there ARE folders in the files).
Are
there any tweaks needed for use with 2007?

Thanks in advance!



"Graham Mayor" wrote:

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!





.



  #13   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Finding All Words with Specific Format -- via Macro


No problem

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Dogwoodnc" wrote in message
...
So sorry, I'm trying to troubleshoot a lot of different macros and was
thinking about another one when I wrote.

I just tried re-copying the original code and it worked perfectly. I'm
not
sure why it was acting up previously.

Thanks for your patience; this one seems to be solved now!



"Graham Mayor" wrote:

The macro in the post you referred to does not have anything to do with
files nor folders. It simply searches the current document for blue
coloured
text and writes any such text found to a new document. That should work
just
as readily in Word 2007 as it does in Word 2003. Can you clarify what
yoiu
are trying to do?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Dogwoodnc" wrote in message
...
This macro worked BEAUTIFULLY for us in Word 2003. However, we're now
preparing to migrate to 2007, and when I try to run it there, it does
not
locate any file names (even though there ARE folders in the files).
Are
there any tweaks needed for use with 2007?

Thanks in advance!



"Graham Mayor" wrote:

You are welcome

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
THANK YOU! That's exactly what I wanted to do!!!


"Graham Mayor" wrote:

How about

Sub CopyBlueToOtherDoc()
Dim Source As Document
Dim Target As Document
Dim oRng As Range
Dim sView As String
Set Source = ActiveDocument
sView = ActiveWindow.View.ShowFieldCodes
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Font.Color = wdColorBlue
Do While .Execute(findText:="", _
MatchWildcards:=False, Wrap:=wdFindStop, _
Forward:=True) = True
Set oRng = Selection.Range
Target.Range.InsertAfter oRng & vbCr
Loop
End With
End With
Target.Activate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Dogwoodnc wrote:
I forgot to mention -- we're using Word 2003, with XP operating
system.

Thanks!

"Dogwoodnc" wrote:

I'm trying to create a macro that will:
a) Find all words/terms in a doc that are formatted blue
b) Copy those words/terms and paste them into a (new) blank
document

I've been able to do this manually (via Find/ Highlight All
Occurrences/ Format(Font)/ Find All/ Copy/ New Doc/ Paste).
However, I have not been able to get a macro to contain these
commands.

Any suggestions??

THANKS in advance!





.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
finding specific sequence of wildcard characters bdr122 Microsoft Word Help 4 May 9th 08 06:26 PM
Finding text at a specific place Kashif Microsoft Word Help 1 April 11th 08 03:10 PM
finding words containing a certain letter BAH Microsoft Word Help 2 October 10th 07 06:37 PM
Macros:How to select a specific column of a table and format it using macro? evg999 Tables 3 January 31st 06 11:20 AM
Finding higlights with a specific color Peter New Users 4 August 5th 05 11:26 PM


All times are GMT +1. The time now is 08:53 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"