Later in 626, Emperor Taizong had Li Jiancheng and Li Yuanji reburied with honors due imperial princes. Wang Gui and Wei Zheng requested permission to accompany Li Jiancheng's funeral procession, and Emperor Taizong approved—and further expanded the approval to an order that all of Li Jiancheng's and Li Yuanji's staff members participate in the funeral processions.
In 627, on an occasion, Emperor Taizong stated to his high-level officials:
- When a good emperor encountered evil subordinates, the empire will not prosper. When an evil emperor encountered good subordinates, the empire will also not prosper. But if an emperor and his subordinates were like fish and water, the empire will have peace. Emperor Gaozu of Han was but a farmer, but he conquered the empire carrying just a short sword. His foundation was strong, and his descendants ruled for generations, because he had good subordinates. Even though I am not an intelligent ruler, it is fortunate that I have you, Dukes, to save me occasion after occasion. I hope that you will give me good strategies to allow the empire to remain peaceful.
Wang responded:
- I heard that if a tree follows a rope it will be straight, and if an empress followed suggestions she would be holy. Therefore, the ancient holy rulers always had seven advisors who were willing to speak honestly and willing to die if their suggestions were not followed. Your Imperial Majesty is willing to receive our weed-like suggestions, and I happen to be serving here in an administration that has no taboos. I am willing to offer my wild words.
Emperor Taizong approved of Wang's response and ordered that whenever high-level officials would meet with him to discuss important matters of state, officials whose responsibilities were criticism should follow them in. He treated Wang with kindness, creating him the Baron of Yongning and made him the deputy head of the examination bureau of government (門下省, Menxia Sheng) as well as an advisor for his son and crown prince Li Chengqian. Later that year, the head of the examination bureau, Gao Shilian, was demoted after he withheld a petition from Wang, and in 628, Emperor Taizong made Wang the acting head of the examination bureau instead—a post considered as one for a chancellor.
On an occasion in 628, Wang was attending a feast held by Emperor Taizong, when a beautiful concubine of Emperor Taizong's, who was originally a concubine of Li Yuan the Prince of Lujiang and who was taken into Emperor Taizong's palace after Li Yuan was executed, was attending to Emperor Taizong. Emperor Taizong stated, "The Prince of Lujiang was despicable. He killed her husband and seized her. How could he survive long after this barbarous act!" Wang instead responded, "Does Your Imperial Majesty believe that the Prince of Lujiang was correct in seizing this woman?" Emperor Taizong responded, "Why do you ask me whether it is correct to kill a woman's husband and seize her?" Wang responded, "I had once read from the writings of Guan Zhong, which stated, 'When Duke Huan of Qi visited the land of Guo [formerly an independent state], he asked the seniors of Guo, "Why was Guo destroyed?" The seniors stated, "The lord of Guo knew right from wrong." Duke Huan responded, "If you are correct, then he was an intelligent ruler. Why was he destroyed?" The seniors responded, "The lord of Guo knew what was right but could not do it. He also knew what was wrong but could not stop doing it. That was why he was destroyed."' Now, this woman is still by your side. I believe it is that Your Imperial Majesty in fact believes that this is right. If you believe that this is wrong, you are the one who knows what is wrong and could not stop doing it." Although Emperor Taizong could not send away the woman, he was nevertheless humbled by Wang's words and respected him for his words. On another occasion, there was an incident where Emperor Taizong had the official Zu Xiaosun (祖孝孫) teach his ladies in waiting music, and when the ladies in waiting could not learn it well, rebuked Zu. Wang and Wen Yanbo spoke against the rebuke, stating that it was not appropriate for Emperor Taizong to have had an important official become a music teacher for ladies in waiting in the first place. Emperor Taizong became angry and rebuked Wen and Wang. Wen bowed and begged for forgiveness, but Wang refused to do so, stating to Emperor Taizong that the rebuke to him and Wen was not warranted as they were reporting what was true. Emperor Taizong was surprised, but the next day indicated to the high-level officials that he was rash and improper in rebuking Wang and Wen.
In 630, Emperor Taizong officially made Wang the head of the examination bureau. On an occasion that year, at a feast Emperor Taizong held for the chancellors, he stated to Wang, "You are known for your good judgment, and you are also a good speaker. Please, starting with Fang Xuanling, discuss what these officials' strengths are." Wang responded:
- As far as being careful and being dedicated to the state, and doing everything that he felt was right, I am not as capable as Fang Xuanling. As far as being capable in both civilian and military matters -- being a great general while not at the capital and being a chancellor while in the capital -- I am not as capable as Li Jing. As far as writing imperial edicts and reporting on important matters, doing so in detail and clearly with fair analysis, I am not as capable as Wen Yanbo. As far as handling complicated issues and emergency matters well, I am not as capable as Dai Zhou. As far as always wishing that the emperor can be compared to Emperor Yao and Emperor Shun and viewing correcting the emperor as his responsibility, I am not as capable as Wei Zheng. But as far as eliminating those lacking virtues and abilities, promoting those who are capable and virtuous, hating evil, and liking righteousness, this is my strength compared to the gentlemen here.
Emperor Taizong agreed strongly, and those present also agreed this as fair analysis. Wang further advocated ruling the state by Confucian principles, a position that Emperor Taizong agreed with. Soon, Emperor Taizong upgraded his title to duke.
In 633, Wang was accused of leaking state secrets, and he was demoted to the post of prefect of Tong Prefecture (同州, roughly modern Weinan, Shaanxi). In 634, Emperor Taizong recalled him to be the minister of ceremonies. In 637, he finished compiling a work on proper ceremonies, and for this contribution Emperor Taizong awarded him with silk and created one of his sons a baron. That year, he was also made the teacher of Emperor Taizong's favorite son Li Tai the Prince of Wei. By Emperor Taizong's orders, Li Tai treated Wang with honors due a teacher, and Wang also accordingly treated Li Tai as a student. Also around the time, Emperor Taizong's daughter Princess Nanping was due to marry Wang's son Wang Jingzhi (王敬直). At those times, the customs were that when a princess married into an official's household, her parents-in-law were to bow to her. Wang believed this to be improper—that princesses needed to be in their proper roles as daughters-in-law, and therefore he instead accepted bows from Princess Nanping. After this, it became customary for princesses to bow to their parents-in-law. Similarly, in 638, Wang submitted a petition pointing out that it was improper to have the high-level officials bow to imperial princes and that it should be the reverse—a suggestion that Emperor Taizong was initially offended by and resisted, but after Wei Zheng pointed out that this would reduce speculations that imperial princes would take the place of the crown prince, Emperor Taizong approved Wang's suggestion.
It was said that when Wang was young and received help from others, he would not thank them. However, after he became an honored official, he sought those who had helped him in the past and repaid them greatly—and if they had died already, repaid their families. He was kind in supporting his widowed sister-in-law and his nephews, and often helped clan members who were less fortunate. However, he was also criticized for not building an ancestral temple, instead only sacrificing to the ancestors privately at home. At one point, he was thus accused by other officials of being not filially pious. Emperor Taizong did not punish him, but had the ministry of constructions construct a temple for Wang to shame him.
In 639, Wang grew ill. Emperor Taizong ordered Princess Nanping to attend to him, and also sent Tang Jian the minister of census to look after Wang's meals and medicines. Wang soon died, and Emperor Taizong mourned him. Emperor Taizong also sent Li Tai and the officials to attend Wang's wake.