Save workbook as PDF when PDF is already open

crookesa

Board Regular
Joined
Apr 11, 2013
Messages
88
I'm trying to save a workbook on sharepoint as a PDF (which I have working using this path \\xxxx.sharepoint.com\sites\xxxx\Shared Documents\) but when someone has the PDF open on either a network share or sharepoint I get the "document not saved" error.

My question is, do I just have to wait until it's closed or is there a workaround to overwrite it.
I have tried used the following code but I still get the same error.

VBA Code:
SetAttr PathName:=sExportFullName, Attributes:=vbReadOnly

I am creating a PDF for people to access in sharepoint as the main workbook resides on a network share which is not available outside of the organisation.
There could possibly be 100+ people who may need to access it.

If this is not workable would people have any other suggestions. I want to use a PDF as people just need the info and not access to the workbook.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,223,958
Messages
6,175,628
Members
452,661
Latest member
Nonhle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top