View Single Post
 
Old 04-06-2022, 01:40 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I'm guessing but I suspect the problem is with what a table cell contains. You are trying to get the text from a table cell which ends with two characters unlikely to be allowed in file names.

Table cells always end with a paragraph mark and an end-of-cell mark. If you trim them off before assigning the rest of the text to the filename you might have more luck
Code:
fName = ActiveDocument.Paragraphs(8).Range
fName = Left(fName,Len(fName)-2)   'add this line
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote