reference-doc word template not in resource path


I am trying to render my quarto file into an MS Word document. I created a reference word template per quarto documentation and placed the call in the YAML header:

      reference-doc: custom-reference-doc.docx

However, when I try to render to my Word document, I get the following error message:

File custom-reference-doc.docx not found in resource path

I am working from within an R project and the reference document is in my current R project working directory, so I do not understand the error in rendering.

Any help is much appreciated.



Are you working in a Quarto project ? Could the R project be a subdirectory of the Quarto project ?

Or is this a single document without any project ?

If there is a _quarto.yml file up the folder tree, it could cause issue on resource look up.

Also which is your quarto version ? Be sure to try latest.



I think that is the issue. I wonder if the issue is that custom-reference-dox.docx is not in the quarto subfolder where my quarto document is. The reference word doc is in the main R project folder.

I did not create a quarto project only an R project.



Oh yes, if you don't have a Quarto project, then the resource should be at the document level. Quarto has no knowledge of R project / RStudio project.

With Quarto project, you should be able to set project path for resource if you want that to be stored at project level, or set the configuration in _quarto.yml

See our doc site About quarto projects

Thanks! I will switch the reference doc to the appropriate folder.

This topic was automatically closed 7 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.