Results 1 to 6 of 6

Thread: [2008] Powerpoint presentation thumbnails

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    [2008] Powerpoint presentation thumbnails

    A powerpoint presentation .ppt or .pps displays its thumbnail in windows explorer.

    How can I generate powerpoint thumbnail to be displayed in a picturebox or datagridview image column ? Can someone show/point me to code ?

    Thanks

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] Powerpoint presentation thumbnails

    Explorer is reading the files metadata. Try a Forums search for thumbnail or such asit should be universal to the file.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Powerpoint presentation thumbnails

    I'm still searching for a way to extract powerpoint metadata.

    Most code shows how to get thumbnails for image files only.

  4. #4
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: [2008] Powerpoint presentation thumbnails

    This one's already been answered for you - within the thread http://www.vbforums.com/showthread.php?t=527704, you can use the C# code found, compile this into a dll and reference in your VB project to find the thumbnail of an office or graphic file type.

    I was playing with this at the weekend for you and it only looks at the exposed thumbnail image of a powerpoint file. From my testing it seems this will default to a copy of the 1st slide you have. However this thumbnail referencing only retreives a small or large thumbnail and no other images stored within the file (I was trying to use this in order retreive an image of each powerpoint slide within a given file at the weekend for you, unfortunately this method doesn't perform that task/is not for reading images within files apart from thumbnails).

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    515

    Re: [2008] Powerpoint presentation thumbnails

    Thanks Alex. I can settle for the 1st slide thumbnail. And thanks for the testing you're doing.

  6. #6
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: [2008] Powerpoint presentation thumbnails

    All I did for this part was follow what was already advised on your other thread here...

    1) You're using VB Express 2008. First off then, download C# Express 2008 also and install this free from the MSDN website.
    2) Open this and create a new C# class library project.
    3) Goto the Experts Exchange site listed within the above link and copy all the code from TheLearnedOne's accepted solution there. Paste this over/into the class shown within your class library project.
    4) Goto project > references menu and add from the 1st, .Net tab, a reference to System.Drawing.
    5) Compile this project and you'll get a DLL.
    6) Open your VB.Net project up and use the project > add reference menu again, this time selecting the browse tab. Pickup the DLL you just compiled.
    7) Start writing the code! Like so:
    Code:
    Dim myCSharpDLLClass as new ShellThumbnail
    Dim myThumbnailImage as bitmap = _ 
    myCSharpDLLClass.GetThumbnail("C:\Path\PowerPointFile.ppt")

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width