Determine Publishing Page check-in/publish status programmatically
-
16-10-2019 - |
Question
Is there a way to determine the check-in/publish status of a Publishing Page programmatically?
For example to determine
- whether the page is checked out (and to whom),
- whether the page has a published version,
etc.
Solution
Check the Level property of the SPFile object. It's a SPFileLevel enumeration with these possible values:Published, Draft, Checkout
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange