Click here to Skip to main content
15,914,500 members

Comments by Cridbro (Top 3 by date)

Cridbro 18-Apr-16 5:29am View    
For this you'll need to have an email client that would be able to retrieve the emails from your email server and delete the required on.
You can use a VB.NET dll for emails, it supports reading emails with both POP and IMAP, for example here is a demonstration on receiving emails with IMAP protocol from VB.NET. Also this demonstration shows how to work with your email folders.
Cridbro 18-Apr-16 5:21am View    
I believe what you're actually looking for is to do a mail merging in C#, that is a task of importing data from some external source into your document. For example you create a table inside your document and place special placeholders (merge fields) into it and when merging the table will be filled with rows (for each record in your source) and cells (that will have values of those records). The article above demonstrates this by using a C# dll for word.
Cridbro 18-Apr-16 4:53am View    
You could use an excel component for .NET, it is able to read your excel files with C# in memory. Even the protected (encrypted) ones, however for them you need to provide password (see here).
So what you could do is use a brute force iteration for password combinations and for each use something like the following:

string password = "ABC";
bool success;

try
{
var ef = ExcelFile.Load("Sample.xlsx", new XlsxLoadOptions() { Password = password });
success = true;
}
catch(FileFormatException)
{
success = false;
}

You do this until "success" is "true".