As the old joke goes, 'If I was going there, I wouldn't start from here'
I would use a Word Range search to find the strings e.g. as follows
Windows security will probably not allow you to write to the root of the C drive so save the text file to another location that will have write access.
The macro writes the values to the named text file (which it will create as required)
Option Explicit
Sub GetValues()
Dim olMsg As MailItem
Dim olInsp As Outlook.Inspector
Dim wdDoc As Object
Dim oRng As Object
Dim oFound As Object
Dim sTemperature As String
Dim sHumidity As String
Dim n As Integer
On Error Resume Next
Set olMsg = ActiveExplorer.Selection.Item(1)
With olMsg
Set olInsp = .GetInspector
Set wdDoc = olInsp.WordEditor
Set oRng = wdDoc.Range
With oRng.Find
Do While .Execute(findText:=" Fahrenheit")
If .found Then
Set oFound = oRng
oFound.collapse 1
oFound.movestartuntil Chr(32), -1073741823
sTemperature = oFound.Text & Chr(176)
Exit Do
End If
Loop
End With
Set oRng = wdDoc.Range
With oRng.Find
Do While .Execute(findText:=" %RH")
If .found Then
Set oFound = oRng
oFound.collapse 1
oFound.movestartuntil Chr(32), -1073741823
sHumidity = oFound.Text & Chr(37)
Exit Do
End If
Loop
End With
End With
n = FreeFile()
Open "C:\Path\test.txt" For Append As #n
Print #n, sTemperature & ", " & sHumidity
Close #n
lbl_Exit:
Set wdDoc = Nothing
Set oRng = Nothing
Set oFound = Nothing
Set olInsp = Nothing
Set olMsg = Nothing
Exit Sub
End Sub