05-22-2019
11:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-22-2019
11:20 AM
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