saphire99
12-19-2015, 05:46 AM
Hello,
to all forum experts and members.
I am looking for some help from the experts.
I am trying to copy strings that begin with a symbol to the top of my document into a placeholder range.
===================================
Lets say that some where in my document I have paragraphs that begin with >>
>> Science Studies
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the
>> Maths Topics - Algebra, Trigonometry
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the
>> Computers Science - Programming, VBA, Excel
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
======================================
I would like to copy the above sentences to the top of my document into an placeholder area.
I will style the placeholder area. So it may have a character style - I thought this would be a good way to insert the strings.
So I will end up with
Placeholder Area
Science Studies
Maths Topics - Algebra, Trigonometry
Computers Science - Programming, VBA, Excel
I tried running a macro - but I just get copy selection and paste selection.:crying:
I tried to create a macro
Application.ScreenUpdating = False
Dim StrFnd As String, Rng As Range, i As Long
StrFnd = " "
.Text = "(>>)[1][A-za-z]{1,}"
For i = 0 To UBound(split(StrFnd, ","))
Set Rng = ActiveDocument.Range
With Rng.Find
.ClearFormatting
.Text = split(StrFnd, ",")(i)
to say I am overwhelmed -
How can I go about doing this?
Thank you so much in advance
Saphire
to all forum experts and members.
I am looking for some help from the experts.
I am trying to copy strings that begin with a symbol to the top of my document into a placeholder range.
===================================
Lets say that some where in my document I have paragraphs that begin with >>
>> Science Studies
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the
>> Maths Topics - Algebra, Trigonometry
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the
>> Computers Science - Programming, VBA, Excel
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
======================================
I would like to copy the above sentences to the top of my document into an placeholder area.
I will style the placeholder area. So it may have a character style - I thought this would be a good way to insert the strings.
So I will end up with
Placeholder Area
Science Studies
Maths Topics - Algebra, Trigonometry
Computers Science - Programming, VBA, Excel
I tried running a macro - but I just get copy selection and paste selection.:crying:
I tried to create a macro
Application.ScreenUpdating = False
Dim StrFnd As String, Rng As Range, i As Long
StrFnd = " "
.Text = "(>>)[1][A-za-z]{1,}"
For i = 0 To UBound(split(StrFnd, ","))
Set Rng = ActiveDocument.Range
With Rng.Find
.ClearFormatting
.Text = split(StrFnd, ",")(i)
to say I am overwhelmed -
How can I go about doing this?
Thank you so much in advance
Saphire