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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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