Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-18-2017, 08:42 AM
Welshgasman Welshgasman is offline Folder path in outlook for moving files Windows 10 Folder path in outlook for moving files Office 2007
Novice
Folder path in outlook for moving files
 
Join Date: Jun 2011
Posts: 26
Welshgasman is on a distinguished road
Default

Hi Graham,


I have tried to adapt your code, and have the following
Code:
Dim objMsg As MailItem
......
Set objMsg = objSourceFolder.Items.Item(intCount)
and it appears to work for some mail messages but not all?
It fails with a Type Mismatch on the above line.

The original code had the variable type as variant?

It appears to fail in the inbox, but only after going through about 60 emails that will not be processed.?

Edit: I changed the variable objMsg to a variant in my code and your Getfolder proc and it works all the way through the folder?

Last edited by Welshgasman; 12-18-2017 at 08:52 AM. Reason: Added change for variant
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Folder path in outlook for moving files Save to PDF with predetermined filename and specific folder path cutemich Word VBA 1 05-09-2017 06:27 PM
Folder path in outlook for moving files Moving body text from old files to new files (based on template) vagabond Word 7 05-02-2017 03:24 PM
Linking to a spreadsheet in the same folder without folder path Jacky837 Excel 0 07-30-2016 05:07 AM
Folder path in outlook for moving files Using user form fields as folder path and file name carlandtina02 Excel Programming 3 04-15-2016 01:47 PM
How to find the path to the downloads folder when it is different for each user CatMan Excel Programming 2 12-07-2012 09:59 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft