How to save a worksheet as pdf into a SharePoint list and include the metadata at the same time

Maria Z 20 Reputation points
2025-06-04T05:03:42.1233333+00:00

I have written vba that saves the current worksheet in excel as a pdf to a SharePoint document list. I would like to save the metadata for the list at the same time. The metadata exists in named cells in the excel worksheet.

This is the vb code I am using to save the pdf of the worksheet to SharePoint. I just want to include the metadata properties too.

'Create the PDF and save into the SharePoint List

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _

    FileName:=MySharePointPath & MyFileName, _

    Quality:=xlQualityStandard, _

    IncludeDocProperties:=True, _

    IgnorePrintAreas:=False, _

    OpenAfterPublish:=False
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,892 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.