dean.rogers
New Member
- Joined
- Apr 6, 2012
- Messages
- 31
Hey all,
I am looking to find text in word and replace it will a cell in excel. That i am able to do perfectly. However I would like to format the data into bullet points. Currently i am using a variable in word to perform the find/replace. That variable maps over as such:
chicago;denver;san francisco;new york;miami
What i'd like to do is once that data maps over to word, to then apply bullet point formatting after each semi-colon.
Here's the code i currently use to map the data:
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDocSelection = wrdApp.Selection
With wrdDocSelection.Find
.Text = "[my_variable]"
.MatchWholeWord = False
.Replacement.Text = ActiveWorkbook.Sheets("Sheet2").Range("D5")
.Execute , , , , , , , , , , wdReplaceAll
Something to note is that in the template that i am applying the find/replace to, the variable will be sitting with a bullet point already.
So the way it maps over currently, I have to then go in and manually just hit enter after each semi-colon to to add an additional bullet point.
Any ideas?
I am looking to find text in word and replace it will a cell in excel. That i am able to do perfectly. However I would like to format the data into bullet points. Currently i am using a variable in word to perform the find/replace. That variable maps over as such:
chicago;denver;san francisco;new york;miami
What i'd like to do is once that data maps over to word, to then apply bullet point formatting after each semi-colon.
Here's the code i currently use to map the data:
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDocSelection = wrdApp.Selection
With wrdDocSelection.Find
.Text = "[my_variable]"
.MatchWholeWord = False
.Replacement.Text = ActiveWorkbook.Sheets("Sheet2").Range("D5")
.Execute , , , , , , , , , , wdReplaceAll
Something to note is that in the template that i am applying the find/replace to, the variable will be sitting with a bullet point already.
So the way it maps over currently, I have to then go in and manually just hit enter after each semi-colon to to add an additional bullet point.
Any ideas?