title: INCLUDEPICTURE use an alternate jpg if MERGEFIELD "filename".jpg is not valid
body: <p>I keep track of hikes we do in an EXCEL spreadsheet. I use WORD to create journal pages using a lot of MERGEFIELDS. I have clean maps of parks. After we do a hike, I use an editor to draw a route on the clean map of where we hiked producing a route map.</p>
  <p>I would like to INCLUDEPICTURE the route map if there is one, otherwise a clean map. For these examples &quot;Death Valley Map.jpg&quot; does exist, &quot;Death Valley Map Route.jpg&quot; does not exist.</p>
  <p>I cannot see that &quot;{ IF TRUE ...&quot; ever does anything. Is there some WORD option or switch that needs to be set? My problem is that I cannot get any if test to branch false when the file does not exist.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">Test Case</th>
  <th style="text-align: left;">Test Result</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;"><code>{ IF &quot;Death Valley Map.jpg&quot; }</code></td>
  <td style="text-align: left;">null</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF &quot;Death Valley Map Route.jpg&quot; }</code></td>
  <td style="text-align: left;">null</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF &quot;Death Valley Map.jpg&quot; &quot;GoodA&quot; &quot;BadA&quot; }</code></td>
  <td style="text-align: left;">GoodA</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF &quot;Death Valley Map Route.jpg&quot; &quot;GoodB&quot; &quot;BadB&quot; }</code></td>
  <td style="text-align: left;">GoodB</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF TRUE &quot;Death Valley Map.jpg&quot; }</code></td>
  <td style="text-align: left;">Death Valley Map.jpg</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF TRUE &quot;Death Valley Map Route.jpg&quot; }</code></td>
  <td style="text-align: left;">Death Valley Map Route.jpg</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF TRUE &quot;Death Valley Map.jpg&quot; &quot;GoodC&quot; &quot;BadC&quot; }</code></td>
  <td style="text-align: left;">Death Valley Map.jpg</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF TRUE &quot;Death Valley Map Route.jpg&quot; &quot;GoodD&quot; &quot;BadD&quot; }</code></td>
  <td style="text-align: left;">Death Valley Map Route.jpg</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { IF TRUE &quot;Death Valley Map.jpg&quot; } &quot;GoodE&quot; &quot;BadE&quot; }</code></td>
  <td style="text-align: left;">GoodE</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { IF TRUE &quot;Death Valley Map Route.jpg&quot; } &quot;GoodF&quot; &quot;BadF&quot; }</code></td>
  <td style="text-align: left;">GoodF</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { IF TRUE &quot;Death Valley Map.jpg&quot; } &lt;&gt; &quot;&quot; &quot;GoodG&quot; &quot;BadG&quot; }</code></td>
  <td style="text-align: left;">GoodG</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { IF TRUE &quot;Death Valley Map Route.jpg&quot; } &lt;&gt; &quot;&quot; &quot;GoodH&quot; &quot;BadH&quot; }</code></td>
  <td style="text-align: left;">GoodH</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { INCLUDEPICTURE &quot;{ IF TRUE &quot;Death Valley Map.jpg&quot; }&quot; \d } &quot;GoodI&quot; &quot;BadI&quot; }</code></td>
  <td style="text-align: left;">GoodI</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { INCLUDEPICTURE &quot;{ IF TRUE &quot;Death Valley Map Route.jpg&quot; }&quot; \d } &quot;GoodJ&quot; &quot;BadJ&quot; }</code></td>
  <td style="text-align: left;">GoodJ</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { IF TRUE { INCLUDEPICTURE &quot;{ IF TRUE &quot;Death Valley Map.jpg&quot; }&quot; \d } } &quot;GoodK&quot; &quot;BadK&quot; }</code></td>
  <td style="text-align: left;">GoodK</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { IF TRUE { INCLUDEPICTURE &quot;{ IF TRUE &quot;Death Valley Map Route.jpg&quot; }&quot; \d } } &quot;GoodL&quot; &quot;BadL&quot; }</code></td>
  <td style="text-align: left;">GoodL</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { IF TRUE { INCLUDEPICTURE &quot;{ IF TRUE &quot;Death Valley Map.jpg&quot; }&quot; \d } } &lt;&gt; &quot;&quot; &quot;GoodM&quot; &quot;BadM&quot; }</code></td>
  <td style="text-align: left;">GoodM</td>
  </tr>
  <tr>
  <td style="text-align: left;"><code>{ IF { IF TRUE { INCLUDEPICTURE &quot;{ IF TRUE &quot;Death Valley Map Route.jpg&quot; }&quot; \d } } &lt;&gt; &quot;&quot; &quot;GoodN&quot; &quot;BadN&quot; }</code></td>
  <td style="text-align: left;">GoodN</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Screen shots in case I didn't type exactly:</p>
  <p><a href="https://i.stack.imgur.com/gHn1c.jpg" rel="nofollow noreferrer">screen shot of test cases</a></p>
  <p><a href="https://i.stack.imgur.com/Z3KrH.png" rel="nofollow noreferrer">screen shot of test results</a></p>