Mar-06-2020, 06:06 PM
I could start a new thread but what I thought was a no brainer add on to the code above has proven to be problematic. The initial code found the desired record by subject and date, once found I thought all I would have to do is the following to write any attachments to a folder of my choosing.
I'm not sure where I've gone off the rails here!
I'm not sure where I've gone off the rails here!
while True: attachment = message.Attachments attachment_items = attachment.Count x = 1 while x <= attachment_items: attachment = attachment.item(x) attachment.SaveAsFile('C:\\BarTender' + '\\'+ str(attachment)) break
Error: File "c:\Users\cartken\Downloads\py\inbox scanner.py", line 36, in <module>
attachment = attachment.item(x)
File "C:\Python\lib\site-packages\win32com\client\dynamic.py", line 527, in __getattr__
raise AttributeError("%s.%s" % (self._username_, attr))
AttributeError: <unknown>.item
Been one of those 'daze'.
Through a cloudy window,
Kip...
“Progress means getting nearer to the place you want to be. And if you have taken a wrong turn, then to go forward does not get you any nearer.
If you are on the wrong road, progress means doing an about-turn and walking back to the right road; and in that case the man who turns back soonest is the most progressive man.” ― C.S. Lewis
Kip...
“Progress means getting nearer to the place you want to be. And if you have taken a wrong turn, then to go forward does not get you any nearer.
If you are on the wrong road, progress means doing an about-turn and walking back to the right road; and in that case the man who turns back soonest is the most progressive man.” ― C.S. Lewis