Re: Troubleshooting with moving Outlook emails to subfolders

Mark Hammond <[email protected]>
Newsgroups gmane.comp.python.windows
Message-ID <[email protected]>
On 19/08/2021 4:37 am, Giraud Ludovic (AMUNDI) wrote:
> Hello Mark,
> 
> I am stuck on this issue: https://github.com/mhammond/pywin32/issues/1743
> 
> I am trying to move outlook emails into subfolders and this works well most of the time.
> 
> However in some cases, probably when a copy of the email I am trying to move already exists into the subfolder, I get the error below using:
> x.Move(self.folder.Folders("Inbox").Folders("VALORISATIONS").Folders("Allianz"))
> 
> Is there a way to specify that you want to eventually crush the existing email in the folder?

I'm afraid it's been over 10 years since I used Outlook's COM model. 
Hopefully someone else here will comment, but 2 observations:

* Search and delete for the mail firstt to see if the problem goes away? 
That will at least validate your hypothesis.

* Don't restrict your googling to Python - this issue will exist in all 
languages which use Outlook via COM and the subsequent solution will be 
identical.

Good luck,

Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.