![]() |
|
|
|
#1
|
||||
|
||||
|
OK, as a barebones solution, this macro will put the results into your VBA Immediate Window. You can then copy/paste that output it to Excel and do a global search and replace to remove the (tool: ) bits.
Code:
Sub ToolTime()
Dim sNum As String, sTool As String, iPos As Integer
Dim aPara As Paragraph, sParaText As String, sData As String
For Each aPara In ActiveDocument.Paragraphs
If aPara.Range.ListFormat.ListString <> "" Then sNum = aPara.Range.ListFormat.ListString
sParaText = aPara.Range.Text
iPos = InStr(sParaText, "(tool:")
If iPos > 0 Then
sTool = Mid(sParaText, iPos)
sData = sData & sNum & vbTab & sTool
End If
Next aPara
Debug.Print sData
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
#2
|
|||
|
|||
|
Thank you, by VBA immediate window you mean a popup window right? I tried running the code but it doesn't do anything. I mean no popup window shows on my vba, despite the correct paratext.
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Word & Excel 2010 - Best Options To Auto Insert MySQL & Excel Data? | Hoser | Word | 1 | 03-17-2017 03:47 PM |
| Embeding Excel Docs in Word - Receiving Memory Error Message if Excel is open | kdash | Word | 0 | 05-06-2015 09:38 AM |
| Populate Word Drop-down list with Excel column then auto fill form fields with Excel data | Faldinio | Word VBA | 7 | 10-19-2014 06:03 AM |
Merge From Excel With Table in Word - Next Record If Excel Column Same?
|
misscrf | Mail Merge | 2 | 10-15-2014 11:51 PM |
Open Word w Excel & fill Word textboxes w info from Excel fields runtime error 4248
|
Joe Patrick | Word VBA | 2 | 01-30-2012 07:23 AM |