"Author" property empty when using VBS macro/add-in

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've created a small PPT add-in with a button that creates a presentation
based on our corporate template.

For this button I've used VBS Presentations.Open command stating the
location of the .pot file that is our corporate temlate.
e.g.
Sub New_presentation()
Presentations.Open Filename:="\\Server\Templates\Company presentation.pot",
Untitled:=msoTrue
End Sub

The problem is that new presentations created using the add-in and do not
contain author's name in file properties. The "author" field in the original
..pot file is blank.

When a new presentation is created from the same template without the use of
the add-in the authors name shows up correctly.

Did I do anything wrong? How should I approach this problem? Did anyone have
the same issue?

Thans,

Ross
 
I've created a small PPT add-in with a button that creates a presentation
based on our corporate template.

For this button I've used VBS Presentations.Open command stating the
location of the .pot file that is our corporate temlate.
e.g.
Sub New_presentation()
Presentations.Open Filename:="\\Server\Templates\Company presentation.pot",
Untitled:=msoTrue
End Sub

The problem is that new presentations created using the add-in and do not
contain author's name in file properties. The "author" field in the original
..pot file is blank.

When a new presentation is created from the same template without the use of
the add-in the authors name shows up correctly.

Did I do anything wrong? How should I approach this problem? Did anyone have
the same issue?

Try:

With Presentations.Add(msoTrue)
.ApplyTemplate("your template here")
' creates a blank presentation then applies your template
' so far, no slides so
.Slides.Add Index:=1, Layout:=ppLayoutTitle ' or whichever you like
End With

One difference that might be important to you:
When you open a template you get all the template's content and formatting
When you open a blank and then APPLY the template, you get just the template's
formatting (ie, you won't get any slides, VBA etc, that are in the template)

You could also open a blank presentation (with no window) and pick up the
document properties you want to use, close the presentation, then apply the
properties to the real presentation you open next.
 
Back
Top