Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8222481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:17:52+00:00 2026-06-07T14:17:52+00:00

I’m working in .NET 3.5, Visual Studio 2010. I’m working on an Outlook Add-In

  • 0

I’m working in .NET 3.5, Visual Studio 2010. I’m working on an Outlook Add-In that saves some email into a folder. I’ve gotten it to work using the Microsoft.Office.Interop.Outlook.MailItem.SaveAs function. However, the file properties have only the current time (time when the file was exported through the Add-In) as their Date Modified/Date Created etc., and other properties such as To, From, CC, BCC are not there.

If you open a folder in Windows Explorer (I’m using Windows 7), go to the top where it says Name, Date Modified, Type, etc., you can click on More, and see other various columns that might be relevant like “Album Artist”, “To”, “From”, etc.

C# has a really easy way to modify the timings, File.SetCreationTime(filename, DateTime object);. However, there’s no .SetTo or .SetAlbumArtist or anything like that. How would I go about modifying those properties?

Update 1: through research, I found this link: Read/Write 'Extended' file properties (C#), so that might contain the answer…but I have no idea how. The accepted answer mentions running a method on a shell using a .dll. The second answer contains C# code, a commenter then asked basically what I want to know (how to modify the properties of a particular file), and the next commenter responded with “you can’t set these”…so I’m still at square 1.

Update 2: I also tried the following:

foreach (Object selectedObject in explorer.Selection)
{
     Outlook.MailItem email = (selectedObject as Outlook.MailItem);
     //Modify the information about the email
     email.To = "I filled in To";
     email.SaveAs(filename, OlSaveAsType.olMSG);
}

This code successfully grabs the selected email(s) and save them under filename. However, the email.To = “I filled in To” changes the information when you open the .msg, but not the file properties.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:17:54+00:00Added an answer on June 7, 2026 at 2:17 pm

    This cannot be changed, because it actually is not any file property in the terms of the filesystem (like file creation or modification datetime).

    Columns in Windows Explorer you are talking about are “virtual” and they are “only” the feature of Windows Explorer. It “understand” content of some file types and it can handle showing and sorting columns like that.

    If you want to change To, From etc. you have to change the content of the file you are saving, i.e. change the To or From in the message.

    To do so, if You have an Microsoft.Office.Interop.Outlook.MailItem object (which you are just saving), set desired properties on that object before you save it to file, i.e.:

    MailItem mail = ...;
    mail.To = "some new to";
    mail.Subject = "new subject";
    mail.SaveAs(fileToSave, OlSaveAsType.OlMSG);
    

    I don’t know if it also changes email stored in the Outlook, if it so, create a copy of the email before changing properties

    MailItem copyOfMailToSave = (MailItem)mail.Copy();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.