Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

oPartDoc = oFileDlg.FileName

 

part doc = file path ---> not going to work, this you don't know because of On Error Resume Next.

 

Replace your OnError thinking with the better Try/Catch/Finally method of error capturing.

Use these methods to get a document from the Application.Documents

Documents.Open(filepath)

or

Documents.OpenWithOptions(filepath,options,openvisibleorhidden)

or

for each doc in Documents

if doc.fullfilename = filepath then

partdoc=doc

end if

next

jvj