How to open Powerpoint file/presentation in new window keeping Blank Presentation open.

Ruby Sharma 1 Reputation point
2022-09-13T12:51:06.61+00:00

We have designed Microsoft Addins for MS PowerPoint 2019 written in VB.net.
There I am trying to open a PowerPoint presentation keeping the blank (Parent window)presentation open with the following given snippet.
Dim objPpt As PowerPoint.Application
Dim objDoc As PowerPoint.Presentation
objPpt = CreateObject("Powerpoint.Application")
objDoc = objPpt.Presentations.Open(processFile, False, , True)
objPpt.Visible = True

This snippet opens the new presentation that I wanted to open but it closes the parent window(Blank Presentation)

I do the exact same code snippet to open word document, and it does not close the blank document and opens the new document .

Dim objWord As Word.Application
Dim objDoc As Word.Document
objWord = CreateObject("Word.Application")
objDoc = objWord.Documents.Open(processFile, , , True, , , , ,, , , , ,, ,)
objWord.Visible = True

So I am bit confused here ,can you assist on it ?

Here are some more information about on which environment I'm working :

Operating System : Microsoft Windows 10 Pro
Code Editor : Visual Studio 2019
Technology : Vb.net(.Net Framework 4.8)
MS Office Version : 2019(32 bit)

Microsoft 365 and Office Development Other
Developer technologies Visual Basic for Applications
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.