mysticmario
Active Member
- Joined
- Nov 10, 2021
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
Hi, Whenever i make changes to certain sheet in my excel I have an auto publish macro which creates html file out of it.
It works great cause the directory I Have put is taken from my PC. However, different people use this file from different PCs and despite this file being on google drive everyone has different path to it how can I make this Publish() sub to get its ChDir using the path it was opened from?
It works great cause the directory I Have put is taken from my PC. However, different people use this file from different PCs and despite this file being on google drive everyone has different path to it how can I make this Publish() sub to get its ChDir using the path it was opened from?
VBA Code:
Sub publish()
ChDir "G:\Mój dysk\ArtProInfo v1.5_Shared"
With ActiveWorkbook.PublishObjects("ArtProInfo v1.5_8106")
.FileName = "G:\Mój dysk\ArtProInfo v1.5_Shared\index.html"
.publish (False)
.AutoRepublish = False
End With
End Sub