Try this function in your macro, before adding your data to text file.
'sValue=text of your cell
'sPad_Text=padding character - " " in most cases
'sType="Left"|"Right"
'iMaxSize=desired width of field (greater than maximum size)
Public Function pad(svalue, spad_text, stype, imaxsize)
Dim length
length = Len(svalue)
If stype = "Left" Then
pad = String(imaxsize - length, spad_text) & svalue
Else
pad = svalue & String(imaxsize - length, spad_text)
End If
End Function