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

  • SEARCH
  • Home
  • 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 7718955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:17:40+00:00 2026-06-01T03:17:40+00:00

I would like to create an outlook message with a subject and some attachments

  • 0

I would like to create an outlook message with a subject and some attachments for the user to send when they are ready. I have the file paths for the attachments. How would I go about doing this?

Basically the user needs to click a button on the application and that open an outlook message window with a predefined message and a few attachments. They should then be able to modify and add the required “To” etc before sending via outlook.

Thanks!

  • 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-01T03:17:41+00:00Added an answer on June 1, 2026 at 3:17 am

    How to send attachments in an e-mail message by using Visual Basic .NET

    http://support.microsoft.com/kb/313803

    Here is the C# version of the code:

    void Main()
    {
        // Create an Outlook application.
        Outlook._Application oApp;
        oApp = new Outlook.Application();
    
        // Create a new MailItem.
        Outlook._MailItem oMsg;
        oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem);
        oMsg.Subject = "Send Attachment Using OOM in Visual Basic .NET";
        oMsg.Body = "Hello World" + vbCr + vbCr;
    
        // TODO: Replace with a valid e-mail address.
        oMsg.To = "user@example.com";
    
        // Add an attachment
        // TODO: Replace with a valid attachment path.
        string sSource = "C:\\Temp\\Hello.txt";
        // TODO: Replace with attachment name
        string sDisplayName = "Hello.txt";
    
        string sBodyLen = oMsg.Body.Length;
        Outlook.Attachments oAttachs = oMsg.Attachments;
        Outlook.Attachment oAttach;
        oAttach = oAttachs.Add(sSource, , sBodyLen + 1, sDisplayName);
    
        // Send
        oMsg.Send();
    
        // Clean up
        oApp = null;
        oMsg = null;
        oAttach = null;
        oAttachs = null;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a file format for my app like Quake, OO,
I would like create a service to do something when some hot situation occurs,
I have a model, I would like create a thumbnail by ImageMagick( yes with
I would like create a MVC3 website. I have existing dlls packaged as .net
i would like create a array of structure which have a dynamic array :
I would like create my own collection that has all the attributes of python
I would like create a web service in ASP.Net 2.0 that will supports JSON.
Would like to create a strong password in C++. Any suggestions? I assume it
I would like to create a database backed interactive AJAX webapp which has a
I would like to create an SSL connection for generic TCP communication. I think

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.