ApplyTheme on THMX Theme File from SharePoint Site using Excel VBA - Stack Overflow

admin2025-05-01  1

Within a macro, I create and save a workbook file.

I want to apply my company's custom THMX theme file on SharePoint.

new_wb.ApplyTheme (sharepoint location as string) 

throws

Error 1004, method 'ApplyTheme' of object '_Workbook' failed

new_wb is a workbook object

  • If I change the file location to a mapped drive it works
  • The SharePoint location string is fine, I use new_wb.SaveAs to save my workbook to the SharePoint location

Is it possible for VBA to read and apply a THMX theme file from a SharePoint location?

转载请注明原文地址:http://anycun.com/QandA/1746072769a91573.html