Prabhakaran_Karuppaih
New Member
- Joined
- May 3, 2021
- Messages
- 11
- Office Version
- 365
- 2016
- Platform
- Windows
- Web
Code:
Sub Operation_PWA_Members()
Dim xlApp As New Excel.Application
xlApp.Visible = True
Dim xlSheet As Worksheet
Set xlSheet = xlApp.Workbooks.Open(Replace(ThisDocument.Path & "\" & ThisDocument.Name, "docm", "xlsm")).Worksheets(1)
With xlSheet
.Range("A1").Value = "Font_Name"
For Each Character In ThisDocument.Characters
With Character
Dim ArrayFromFilter As Variant
ArrayFromFilter = Filter(Array(xlSheet.UsedRange.Value), .Font.Name)
If Not IsEmpty(ArrayFromFilter) Then
xlSheet.Cells.SpecialCells(xlCellTypeLastCell).Offset(1, 0).Value = .Font.Name
End If
End With
Next Character
End With
End Sub
p.s:
I am getting a 'Type-Mismatch' Error from the 2nd iteration itself.
How to make it work on the following iterations too... Please Help.
With Hope,
Prabhakaran