MS Publisher, VBA sample macro from Microsoft creates Automation error

In a MS Publisher VBA module, I am trying to open an other Publisher instance. I found the attached sample code on the microsoft website. Unfortunately it does not work on my computer. Any ideas what I need to do to make it work?
Sub ModifyAnotherPublication()
    ' Create new instance of Publisher.
    Dim appPub As New Publisher.Application
    ' Open publication.
    appPub.Open Filename:="C:\"
    ' Put code here to modify the publication as necessary.
    ' Close the publication.
    ' Release the other instance of Publisher.
    Set appPub = Nothing
End Sub

Open in new window

Who is Participating?
VB-tinkererConnect With a Mentor Author Commented:
I have not received a solution to this question.

However I managed to find a different way to create an other instance of MS Publisher. (see code below) So no further input is required.
Set pubApp = CreateObject("Publisher.Application")
With pubApp
End With

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.