Trouble importing Word docs with officer

I'm trying to import Word documents into R using the officer package. However, with some documents I get an error message and with others, they import perfectly fine.

Attleboro <- read_docx("d://Attleboro.docx")
Error: could not find file "d://Attleboro.docx"

Documents that are imported successfully and unsuccessfully are from the same drive.

Can you just confirm that a different function, e.g. file.exists() does find the file? Put the file path in a variable to make sure it's not a subtle typo:

my_path <- "d:\\Attleboro.docx"
file.exists(my_path)
read_docx(my_path)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.