View Single Post
 
Old 02-06-2023, 04:42 AM
jan.w jan.w is offline Windows 10 Office 2021
Novice
 
Join Date: Feb 2023
Posts: 2
jan.w is on a distinguished road
Default

Hello, I've a workbook "Inspections.xlsx" with worksheet named "Observations" saved in C:\Users\ABC\Documents\. Photos are also saved at the same folder. I've changed the code like this

Code:
StrWkBkNm = "C:\Users\ABC\Documents\Inspections.xlsx"
StrDocPath = ActiveDocument.Path
StrRpt = Right(StrDocPath, Len(StrDocPath) - InStrRev(StrDocPath, "\"))
StrWkSht = "Observations"
StrPicPath = "C:\Users\ABC\Documents\"
When I compile the code, I got a "Compile error: Method or data member not found", pointing to .Name of this line
Code:
If .Name = "TblPic" Then bFnd = False: Exit For
Please help.
Reply With Quote