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 7539765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:28:12+00:00 2026-05-30T07:28:12+00:00

I want to view presentation in PowerPoint viewer, ppt file is in a resources.

  • 0

I want to view presentation in PowerPoint viewer, ppt file is in a resources. so the problem is that how can i access it and view in PowerPoint viewer.

Here is sample code

Process.Start(@"C:\Program Files\Microsoft Office\Office12\PPTVIEW.exe",**@"e:\presentation.ppt")**;

How can i replace this path by ppt containing in resources?

  • 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-05-30T07:28:14+00:00Added an answer on May 30, 2026 at 7:28 am

    Actually, what you ask for is a common pattern and there are some related questions and answers here on SO.

    Basically what you do in general is the following:

    1. locate the resource in question and open a resource stream to it.
    2. Save the stream to a (temporary) file if your target API cannot deal with streams or byte arrays directly.
    3. Perform whatever operation on the file or directly on the stream/byte array (as I said, if supported).
    4. Eventually remove the temporary file, if any, from step 1.

    So, you first extract the PPT file (actually it doesn’t really matter that it is a PPT file, could by any file or byte blob for that matter).

    string tempFile = Path.GetTempFileName();
    
    using (Stream input = assembly.GetManifestResourceStream("MyPresentation.PPT"))
    using (Stream output = File.Create(tempFile))
    {
       input.CopyTo(output); // Stream.CopyTo() is new in .NET 4.0, used for simplicity and illustration purposes.
    }
    

    Then you open it using Process.Start(). You don’t need to specify the path to the Powerpoint executable, as PPT should be a registered file extension with either PowerPoint or the PowerPoint Viewer. If you have both installed, you may still want to provide the path to the relevant executable to prevent launching the wrong application. Make sure that you don’t hardcode the path though, but try to retrieve it from the registry (or similar, I haven’t checked because that gets too specific now).

    using (var process = Process.Start(tempFile))
    {
       process.WaitForExit();
       // remove temporary file after use
       File.Delete(tempFile);
    }
    

    Note: I left out quite some error handling that you might want to add in a real application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use code similar to that found here. The issue I'm having
I want to view the nfs shares that are exported on a windows server
I saw some websites that (for example): if you want to view your message
I want to change something in view(user-control) class from itself Presentation class. For example
Essentially here I want the modal form sheet to be transparent so I can
I want to use the View Model Locator in a Child Window. Problem is
I have two views, both under the NavigationController. I don't want View 1 (on
I want to view the stream of the RGB data color stream on an
i want a view with UITabBAr at The bottom with some buttons+Navigation controller on
Using Crystal report 7 I want to view the table 1 and sum of

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.