Closing publisher document windows 10 office 2016

wackywoo105

Registered User.
Local time
Today, 14:42
Joined
Mar 14, 2014
Messages
203
Having created a publisher document object using:

Code:
Dim appPub As Publisher.Application
Dim pubDoc As Publisher.Document
Dim pubShape As Publisher.Shape

Set appPub = New Publisher.Application
Set pubDoc = appPub.Open(MyDoc)

I use the following code to close it:

Code:
pubDoc.Close
appPub.Quit
Set appPub = Nothing

This code however doesn't work in Windows 10. It's fine with Windows 7. In Windows 10 the publisher window stays open but the document goes blank.

Can anyone help with the code required to release the publisher object and close it without saving?
 
This is just a shot in the dark but you could try prefixing it with Appplication, e.g.,
Code:
Application.appPub.Quit

I'd also make sure your reference for Publisher is ok and you could try late binding to see if that changes anything,
 
This is just a shot in the dark but you could try prefixing it with Appplication, e.g.,
Code:
Application.appPub.Quit
,

Thanks for that I tried it but it fails with compile error.

I did have a dabble with late binding when I was running office 2013 and 2016 concurrently. My reference libraries kept update when I opened and saved the files in 2016 rendering them incompatible with 2013.

After a lot of effort I still kept running into issues so just updated to 2016 for all pc's.
 
Ok I'm closing it down normally. With Windows 10 this leaves me with a blank document in an open publisher window. If running windows 10 I then use:

Code:
Call Shell("taskkill /f /im mspub.exe")
 
Ok I'm closing it down normally. With Windows 10 this leaves me with a blank document in an open publisher window. If running windows 10 I then use:

Code:
Call Shell("taskkill /f /im mspub.exe")
Yuck. This is no way to live. Can you get any support from Microsoft on this?
 
Last edited:
I don't know why it is doing this. In windows 7 it works perfectly. I have tried all iterations of close and quit etc. With windows 10 I always end up with a blank page in an still open publisher window.

I may try and see if there is any microsoft support for this, but at least I have a work around for now. I didn't want to plough forward if there was no fix.
 

Users who are viewing this thread

Back
Top Bottom