Read and Write to Text File

Alan McGowan

Senior Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
I have created a macro that I use to batch save emails in MSG format to specific folders on a server. At present the folder paths are held in a spreadsheet and displayed on a userform where you can pick which folder to use. I've noticed recently that the macro is running very slowly and I suspect the issue is due to Excel opening slowly in the background when the macro reads from the spreadsheet. I was wondering if using a simple text file would be quicker? and also then wondering how you would go about reading specific values from a text file and on a similar note how you would write the values to the text file as I have another userform where you can edit the folder list held in the spreadsheet without having to open the spreadsheet directly i.e. you can do it all within Outlook. Any thoughts?
 

Alan McGowan

Senior Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
I have created a macro that I use to batch save emails in MSG format to specific folders on a server. At present the folder paths are held in a spreadsheet and displayed on a userform where you can pick which folder to use. I've noticed recently that the macro is running very slowly and I suspect the issue is due to Excel opening slowly in the background when the macro reads from the spreadsheet. I was wondering if using a simple text file would be quicker? and also then wondering how you would go about reading specific values from a text file and on a similar note how you would write the values to the text file as I have another userform where you can edit the folder list held in the spreadsheet without having to open the spreadsheet directly i.e. you can do it all within Outlook. Any thoughts?
Having thought about it some more what I think I really need is a way to read a csv file and populate a listbox. It would also be good to be able to add to the csv file from textbox's on a userform but this is less essential at the present time.
 

Similar threads

Top