OK, that error reporting style is associated with subroutine calls and queries, which you didn't show us. The instruction line you showed us doesn't invoke a function likely to trigger that error. There is no "error" signaled by the LEFT function if the contents of [WordDocs.Name] is shorter than 25 characters. It just provides what you have up to the leftmost 25 characters. But it CAN and DOES return fewer characters if you provide fewer characters. Not 100% sure but it will probably ONLY barf if somehow you fed it a NULL field and I absolutely would rule out that you did that because the error in that case would NOT be the one you reported..
I generally associate that error-reporting syntax, specifically the "|1" part, with an error in the first field named in a query. But you showed us no query. I don't offhand know anything about QMO portal so anything else I offer would be guessing. I tried to look it up online but the answers were ambiguous because I don't know the correct product name.
I would be concerned about the possible implications of assuming that the left function is always bound to work.
left(worddocsname,25)
I would add code to check the length, and report it in some cases. There must be some reason to select the first 25 chars, as otherwise you could just use the entire file name without testing it at all. Maybe there's some illegal character in the file name.
In passing, I struggle to see how that error 2465 could refer to the line of code you mention either.
Maybe the file referred to by the assignment of docxfile doesn't exist. Maybe it's even just open and can't be used.
I changed WordDocsname = "CC177"
tt= fldfolder & "\" & left(worddocsname,25) still worked OK.
I was even surprised that Left(whatever,0) even works? It does not complain of an error, of course does not produce anything?
I changed WordDocsname = "CC177"
tt= fldfolder & "\" & left(worddocsname,25) still worked OK.
I was even surprised that Left(whatever,0) even works? It does not complain of an error, of course does not produce anything?