The General Assembly led by Moderator the Right Rev John Chalmers said there will be “much work” for ministers following the historic ballot on September 18.
In a letter presented at the opening of the General Assembly on Saturday, the Queen recognised the role of the Kirk in ‘’holding the people of Scotland together’’ as they decide the country’s future.
In a written response today, the Church said: “We sincerely appreciate Your Majesty’s prayers for the social good of Scotland in this year of referendum.
“Whatever the outcome, we anticipate that there will afterwards be much work for the Church to do in helping people to address the consequences of the referendum and to be reconciled with each other.”
Hundreds of Church of Scotland representatives are meeting in Edinburgh this week to discuss church policy and governance at the annual General Assembly.
The referendum will be debated at tomorrow’s session.
In her letter to the Assembly, the Queen said: “In this important year of referendum we pray that whatever the outcome, people of faith and people of goodwill will work together for the social good of Scotland.
‘’We recognise too the important role that the church can play in holding the people of Scotland together, in healing divisions and in safeguarding the interests of the most vulnerable.”
The Queen also recognised the Church’s role in welcoming the people of Commonwealth countries to Scotland during this summer’s Games.
The Church said: “We sincerely appreciate Your Majesty’s thoughts as to the Church’s role in welcoming those who will visit Scotland this summer as competitors and spectators.
“The Church sees much to applaud both in participation and in the pursuit of excellence in sport and trusts that the Games will provide an exciting spectacle of competitive and fair sporting endeavour.
“Within the Commonwealth, the Church continues to rejoice in its links with other churches and remains actively engaged on matters of concern to our sister churches and fellow Commonwealth citizens.”
The Church said the Queen and the Duke of Edinburgh would continue to be in its prayers.
The letter said: “We rejoice at the remarkable number of public engagements and duties which Your Majesty and His Royal Highness continue to carry out in the course of serving our nation and Commonwealth, and the Church of Scotland wishes once more to commend Your Majesty for all that has been accomplished in the course of Your Majesty’s reign.”