[GNC] Change Linked Document Path

Jim DeLaHunt list+gnucash at jdlh.com
Sun Sep 4 21:28:58 EDT 2022


Geoff:

On 2022-09-03 04:47, Geoff Storer wrote:
> Hi Jim
> Answers to your questions
> ...[some answers elided]...

Many thanks for these answers. I now have a clearer idea of what is 
going on.

It looks to me like this is an area where GnuCash does not help us out 
much with clear information. However, I did some experiments, and I 
think I have a workaround that might get you fixed up.

So, here is what I understand of your situation:

You recently upgraded GnuCash. You are now running GnuCash 4.11 on Windows.

Your linked documents are presently in one folder, "D:\PDF\GNU 
Invoices".  This is the same location as before you upgraded GnuCash. 
Before the upgrade, you were able to open the linked documents from 
within GnuCash.

When you try to open a linked document, either by clicking on the letter 
"f" icon in a transaction with a linked document, or by selecting a 
transaction and selecting the menu item, "Transaction… Open linked 
document…", GnuCash does not open the linked document. Instead, it shows 
you a dialogue, "GnuCash could find the linked document…" [with a full 
path to a file].

It is wise to test the workaround on a copy of your GnuCash book 
document, before trying it on the real thing. Make a copy of your book 
as follows:

In GnuCash, save your real GnuCash book document.

Select menu item "File… Save As…". A File Save dialogue appears.

Switch to a different directory (if you prefer), and type a different 
name for the test book (e.g. test_2022-09). Press the "Save As" button. 
The File Save dialogue disappears. The book name at the top of the 
window changes.

Perform the steps below for the workaround. Make notes of exactly what 
you do, which boxes you check, which filenames you enter, which 
directories you select.

If things go wrong, make another copy of your test book, and try again. 
As more questions on this list if you need to.

Once things go right, then return to your real GnuCash book document. In 
GnuCash, select menu item "File…". A menu appears. At the bottom of the 
menu are four recent book file names. Select the name of your real book. 
Then, referring to your notes, go through the exact steps which worked 
for you.

Here is the workaround:

In GnuCash, select menu item "Preferences". The GnuCash Preferences 
window opens.

Select tab "General" in the left column, then find heading "Linked 
Files" in the right part of the Window.

Click on the pull-down menu labelled "Path head for Linked Files 
Relative Paths". Select "Other…" from the menu. An Open Folder dialogue 
appears.

Select a folder which is 1. different than the currently shown folder, 
and 2. different than the directory where your linked documents are 
stored. For instance, a folder within your Documents folder might do 
nicely. Click Open. A "Changed Linked Document path head" dialogue 
appears. It has two checkboxes.

The first box is labelled, "Existing relative file path links will be 
converted to absolute ones…". Be sure this box is CHECKED.

The second box is labelled, "Existing absolute file path links will be 
converted to relative ones…". Be sure this box is UNchecked.

Click the OK button. The "Changed Linked Document path head" dialogue 
disappears, and the GnuCash Preferences dialogue reappears.

For a second time, click on the pull-down menu labelled "Path head for 
Linked Files Relative Paths". Select "Other…" from the menu. An Open 
Folder dialogue appears.

This time, select the folder which contains your linked documents. I 
understand that this is, "D:\PDF\GNU Invoices". Click Open. A "Changed 
Linked Document path head" dialogue appears. It has two checkboxes.

The first box is labelled, "Existing relative file path links will be 
converted to absolute ones…". Be sure this box is UNchecked.

The second box is labelled, "Existing absolute file path links will be 
converted to relative ones…". Be sure this box is CHECKED.

Click the OK button. The "Changed Linked Document path head" dialogue 
disappears, and the GnuCash Preferences dialogue reappears.

Click the Close button. The GnuCash Preferences dialogue disappears.

Now, find a transaction with a linked document, and try opening the 
document. Hopefully, it will now work.

How did that work for you?

       —Jim DeLaHunt




More information about the gnucash-user mailing list