Toucanier
asked on
Check in PDF document to SharePoint from Excel using VBA
Hi
Can anyone post some simple vba code that I can plug in to my own code to allow me to automatically check in PDF files that have just been automatically created and saved on a SharePoint site?
I'm using the simple procedure, below, which works but means that I have the inconvenience of having to do manual check-ins afterwards.
Can anyone post some simple vba code that I can plug in to my own code to allow me to automatically check in PDF files that have just been automatically created and saved on a SharePoint site?
I'm using the simple procedure, below, which works but means that I have the inconvenience of having to do manual check-ins afterwards.
Sub SaveAsPDF(ByVal theFileName As String, theID As String)
Dim myPath As String
Sheets(theID).Select
myPath = Range("IssueDefectPath") & theFileName & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=myPath, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
ActiveWorkbook.Save
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much for this. I only needed to tweak a few variables and it worked perfectly. This will save me many hours of mundane work when automatically creating PDFs.
just verified to code and it works :-)
(at least on my demo machine)