日期:2014-05-16  浏览次数:20852 次

怎样批量删除ACCESS字段数据里复制粘贴进去的word代码?
自己做的一个新闻管理系统,经常复制一些WORD文件内容,不知不觉把WORD一些多余代码都写入数据库了,造成数据库庞大,现在已经知道下次发信息前,先把word内容粘贴到DW里,再复制粘贴到新闻发布编辑框,这样就能既保留格式又能尽量减少WORD沉重繁琐代码。

但是,之前写到数据库的几千条怎么办?有没有成熟的代码供参考?谢谢了~

部分代码如下,及其繁琐~
------------------------
<div> <P class=MsoNormal style=""MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center"" align=center><SPAN style=""FONT-SIZE: 42pt; FONT-FAMILY: 黑体"">公<SPAN lang=EN-US><SPAN style=""mso-spacerun: yes"">&nbsp; </SPAN></SPAN>示<SPAN lang=EN-US><?xml:namespace prefix = o ns = ""urn:schemas-microsoft-com:office:office"" /><o:p></o:p></SPAN></SPAN></P> <P class=MsoNormal style=""MARGIN: 0cm 0cm 0pt""><B style=""mso-bidi-font-weight: normal""><SPAN style=""FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"">文字。。。。</SPAN></B><B style=""mso-bidi-font-weight: normal""><SPAN lang=EN-US style=""FONT-SIZE: 14pt"">:</SPAN></B><SPAN lang=EN-US style=""FONT-SIZE: 42pt; FONT-FAMILY: 黑体""><o:p></o:p></SPAN></P> <P class=MsoNormal style=""MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 35pt; LINE-HEIGHT: 30pt; mso-char-indent-count: 2.5; mso-line-height-rule: exactly""><SPAN style=""FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"">












<SPAN lang=EN-US style=""FONT-SIZE: 14pt""><o:p></o:p></SPAN></P> <P class=MsoNormal style=""MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 286.7pt; LINE-HEIGHT: 30pt; mso-char-indent-count: 20.4; mso-line-height-rule: exactly""><B style=""mso-bidi-font-weight: normal""><SPAN lang=EN-US style=""FONT-SIZE: 14pt"">2012</SPAN></B><B style=""mso-bidi-font-weight: normal""><SPAN style=""FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"">年</SPAN></B><B style=""mso-bidi-font-weight: normal""><SPAN lang=EN-US style=""FONT-SIZE: 14pt"">9</SPAN></B><B style=""mso-bidi-font-weight: normal""><SPAN style=""FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"">月</SPAN></B><B style=""mso-bidi-font-weight: normal""><SPAN lang=EN-US style=""FONT-SIZE: 14pt"">18</SPAN></B><B style=""mso-bidi-font-weight: normal""><SPAN style=""FONT-SIZE: 14pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"">日</SPAN></B><B style=""mso-bidi-font-weight: normal""><SPAN lang=EN-US style=""FONT-SIZE: 14pt""><o:p></o:p></SPAN></B></P></DIV> </DIV>
------解决方案--------------------
应该没有.
自己用正则替换,对于不同格式风格和不同具体内容来说,误操作会比较高.
我有个相对方便可行的方法,但还是需要一些数据库编程和VBA的常识的,不知楼主行不行,我又没精力