Forum Discussion

pschuetz's avatar
pschuetz
Copper Contributor
Nov 15, 2023

Cell protection not functional when using mail merge

Hello,

 

I encountered following problem:

We use Excel tables as a database for Word templates (product inserts). We feed in product-specific data from the Excel spreadsheet using the mail merge function.

 

We have cell protection active on this Excel table. Only a few of the columns are enabled (cells unlocked), as they have to be adjusted on an ongoing basis (batch number, expiry).

 

However, these unlocked cells are edited using the mail merge function (Mailings-->Edit recipient list --> Dialog "Mail Merge Recipents"--> data source --> edit.)

But I discovered that this function can be used to bypass the cell protection in the Excel table. The areas that are actually cell protected can be overwritten using this function.

 

Is this a bug?

Is there a way to ensure that the cells are also protected when using mailing functions ? 

 

Thank you  

 

2 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    pschuetz 

    It seems that the behavior you're experiencing might be related to the way mail merge interacts with Excel cells. While cell protection in Excel is designed to prevent direct changes, certain operations, like mail merge, might bypass these protections.

    One way to address this issue is to add an extra layer of protection or validation through Excel's data validation feature. You can use data validation to restrict the type of data that can be entered into a cell, providing an additional level of control even when cell protection is bypassed.

    Here's a general outline of how you might use data validation:

    1. Protect the Sheet:
      • Protect the entire sheet with cell protection. You can do this by going to the "Review" tab and clicking on "Protect Sheet." Choose a password if needed and specify the options you want to allow (e.g., select unlocked cells).
    2. Apply Data Validation:
      • For the columns where you want to enforce specific rules, use Excel's data validation feature. For example, you can set up data validation to only allow numbers, specific date ranges, or lists of values.
    3. Test Your Setup:
      • After protecting the sheet and applying data validation, test to see if changes made through mail merge still adhere to the data validation rules.

     

    This combination of cell protection and data validation can provide an additional layer of control, helping to ensure that even if cell protection is bypassed, the data entered complies with the rules you've set.

    Remember to thoroughly test the setup to make sure it meets your specific requirements and doesn't introduce any unintended issues. The text was revised with the AI.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

     

    Was the answer useful? Mark as best response and like it!

    This will help all forum participants.

    • pschuetz's avatar
      pschuetz
      Copper Contributor

      NikolinoDE 

      Thank you for your reply,

      I have tried the data validation approach as you suggested. Unfortunately, the result is still the same.

       

      I can also use the mail merge function to edit the cells that have a rule. The protection is simply ignored. I can change the cells and save the file.

       

      However, if I try to change the cells directly in Excel, this is not allowed. Just as it should be.

Resources