自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(2)
  • 资源 (13)
  • 收藏
  • 关注

转载 zvcxz

 

2007-09-09 15:00:00 432

原创 bbbb

http://topic.csdn.net/t/20041103/15/3517894.html  (GridView)http://www.6635.info/archive/xiaolin/2007-01-12-618555/  (GridView)http://www.cnblogs.com/allonkwok/archive/2006/12/12/589930.aspx (Grid

2007-09-09 11:58:00 472

插入分页符

先定位到要分页的位置,再调用 <br> ActiveWindow.Selection.InsertBreak(wdPageBreak)<br><br>分页<br>app.Selection.ParagraphFormat.Alignment=Word.WdParagraphAlignment.wdAlignParagraphCenter;//(对齐)<br><br>object insertBreak=null;<br><br>insertBreak=0;<br><br>app.Selection.InsertBreak(ref insertBreak);//插入分页符<br><br>//插入分页符<br>app.Selection.ParagraphFormat.Alignment=Word.WdParagraphAlignment.wdAlignParagraphCenter;//(对齐) <br> <br> object insertBreak=null; <br> insertBreak=0; <br> app.Selection.InsertBreak(ref insertBreak);//插入分页符 <br><br>http://blog.csdn.net/ranlianjie/archive/2007/08/30/1765817.aspx<br>通过段落控制插入<br> object oMissing = System.Reflection.Missing.Value;<br> object oEndOfDoc = "\endofdoc"; /**//* endofdoc is a predefined bookmark */<br><br> //Start Word and create a new document.<br> Word._Application oWord;<br> Word._Document oDoc;<br> oWord = new Word.Application();<br> oWord.Visible = true;<br> oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,<br> ref oMissing, ref oMissing);<br><br> //Insert a paragraph at the beginning of the document.<br> Word.Paragraph oPara1;<br> oPara1 = oDoc.Content.Paragraphs.Add(ref oMissing);<br> oPara1.Range.Text = "Heading 1";<br> oPara1.Range.Font.Bold = 1;<br> oPara1.Format.SpaceAfter = 24; //24 pt spacing after paragraph.<br> oPara1.Range.InsertParagraphAfter();

2007-09-29

infoxmix日期比较

时间函数<br><br>day,mdy,month,weekday,year这些函数返回与用来调用函数的表达式或自身变量的值。Current返回当前的日期和时间值,可以用extend函数来调整date或datetime值的精度。使用day和current函数来将列值与当前日期进行比较。 <br><br>Date函数将字符串函数转换为DATE值。例date(‘12/7/04’) <br><br>To_char函数将datetime和date值转化为字符值。 <br><br>To_date函数将字符值转化为datetime类型的值。例to_date(“1978-10-0710:00”,”%Y-%m-%d%H:%M) <br><br>http://www.builder.com.cn/2007/0913/504607.shtml

2007-09-27

Menu菜单操作实例

Menu菜单操作实例

2007-09-26

操作word文档类(c#)3

操作word文档类(c#)3

2007-09-26

操作word文档类(c#)2

操作word文档类(c#)2

2007-09-26

操作word文档类(c#)1

操作word文档类(c#)1

2007-09-26

word表格格式

表格格式:<br>http://hi.baidu.com/metaza/blog/item/b277ccc4183b73ab8226ac8b.html<br>http://www.cnblogs.com/cryf/articles/718605.html<br><br>转载自 微软MSDN<br><br>private void button1_Click(object sender, System.EventArgs e)<br>{<br>object oMissing = System.Reflection.Missing.Value;<br>object oEndOfDoc = "\\endofdoc"; <br><br>/* \endofdoc是预定义的bookmark */ <br><br>//创建一个document.<br>Word._Application oWord;<br>Word._Document oDoc;<br>oWord = new Word.Application();<br>oWord.Visible = true;<br>oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,<br>ref oMissing, ref oMissing);<br><br>//在document的开始部分添加一个paragraph.<br>Word.Paragraph oPara1;<br>oPara1 = oDoc.Content.Paragraphs.Add(ref oMissing);<br>oPara1.Range.Text = "Heading 1";<br>oPara1.Range.Font.Bold = 1;<br>oPara1.Format.SpaceAfter = 24; //24 pt spacing after paragraph.<br>oPara1.Range.InsertParagraphAfter();<br><br>//在当前document的最后添加一个paragraph<br><br>Word.Paragraph oPara2;<br>object oRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;<br>oPara2 = oDoc.Content.Paragraphs.Add(ref oRng);<br>oPara2.Range.Text = "Heading 2";<br>oPara2.Format.SpaceAfter = 6;<br>oPara2.Range.InsertParagraphAfter();<br><br>//接着添加一个paragraph<br>Word.Paragraph oPara3;<br>oRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;<br>oPara3 = oDoc.Content.Paragraphs.Add(ref oRng);<br>oPara3.Range.Text = "This is a sentence of normal text. Now here is a table:";<br>oPara3.Range.Font.Bold = 0;<br>oPara3.Format.SpaceAfter = 24;<br>oPara3.Range.InsertParagraphAfter();<br><br><br>//添加一个3行5列的表格,填充数据,并且设定第一行的样式<br><br>Word.Table oTable;<br>Word.Range wrdRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;<br>oTable = oDoc.Tables.Add(wrdRng, 3, 5, ref oMissing, ref oMissing);<br>oTable.Range.ParagraphFormat.SpaceAfter = 6;<br>int r, c;<br>string strText;<br>for(r = 1; r <= 3; r++)<br>for(c = 1; c <= 5; c++)<br>{<br>strText = "r" + r + "c" + c;<br>oTable.Cell(r, c).Range.Text = strText;<br>}<br>oTable.Rows[1].Range.Font.Bold = 1;<br>oTable.Rows[1].Range.Font.Italic = 1;<br><br>//接着添加一些文字<br><br>Word.Paragraph oPara4;<br>oRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;<br>oPara4 = oDoc.Content.Paragraphs.Add(ref oRng);<br>oPara4.Range.InsertParagraphBefore();<br>oPara4.Range.Text = "And here's another table:";<br>oPara4.Format.SpaceAfter = 24;<br>oPara4.Range.InsertParagraphAfter();<br><br><br>//添加一个5行2列的表,填充数据并且改变列宽<br>wrdRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;<br>oTable = oDoc.Tables.Add(wrdRng, 5, 2, ref oMissing, ref oMissing);<br>oTable.Range.ParagraphFormat.SpaceAfter = 6;<br>for(r = 1; r <= 5; r++)<br>for(c = 1; c <= 2; c++)<br>{<br>strText = "r" + r + "c" + c;<br>oTable.Cell(r, c).Range.Text = strText;<br>}<br>oTable.Columns[1].Width = oWord.InchesToPoints(2); //Change width of columns 1 & 2<br>oTable.Columns[2].Width = oWord.InchesToPoints(3);<br><br>//Keep inserting text. When you get to 7 inches from top of the<br>//document, insert a hard page break.<br>object oPos;<br>double dPos = oWord.InchesToPoints(7);<br>oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range.InsertParagraphAfter();<br>do<br>{<br>wrdRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;<br>wrdRng.ParagraphFormat.SpaceAfter = 6;<br>wrdRng.InsertAfter("A line of text");<br>wrdRng.InsertParagraphAfter();<br>oPos = wrdRng.get_Information<br> (Word.WdInformation.wdVerticalPositionRelativeToPage);<br>}<br>while(dPos >= Convert.ToDouble(oPos));<br>object oCollapseEnd = Word.WdCollapseDirection.wdCollapseEnd;<br>object oPageBreak = Word.WdBreakType.wdPageBreak;<br>wrdRng.Collapse(ref oCollapseEnd);<br>wrdRng.InsertBreak(ref oPageBreak);<br>wrdRng.Collapse(ref oCollapseEnd);<br>wrdRng.InsertAfter("We're now on page 2. Here's my chart:");<br>wrdRng.InsertParagraphAfter();<br><br>//添加一个chart<br><br>Word.InlineShape oShape;<br>object oClassType = "MSGraph.Chart.8";<br>wrdRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;<br>oShape = wrdRng.InlineShapes.AddOLEObject(ref oClassType, ref oMissing, <br>ref oMissing, ref oMissing, ref oMissing,<br>ref oMissing, ref oMissing, ref oMissing);<br><br>//Demonstrate use of late bound oChart and oChartApp objects to<br>//manipulate the chart object with MSGraph.<br>object oChart;<br>object oChartApp;<br>oChart = oShape.OLEFormat.Object;<br>oChartApp = oChart.GetType().InvokeMember("Application",<br>BindingFlags.GetProperty, null, oChart, null);<br><br>//Change the chart type to Line.<br>object[] Parameters = new Object[1];<br>Parameters[0] = 4; //xlLine = 4<br>oChart.GetType().InvokeMember("ChartType", BindingFlags.SetProperty,<br>null, oChart, Parameters);<br><br>//Update the chart image and quit MSGraph.<br>oChartApp.GetType().InvokeMember("Update",<br>BindingFlags.InvokeMethod, null, oChartApp, null);<br>oChartApp.GetType().InvokeMember("Quit",<br>BindingFlags.InvokeMethod, null, oChartApp, null);<br>//... If desired, you can proceed from here using the Microsoft Graph <br>//Object model on the oChart and oChartApp objects to make additional<br>//changes to the chart.<br><br>//Set the width of the chart.<br>oShape.Width = oWord.InchesToPoints(6.25f);<br>oShape.Height = oWord.InchesToPoints(3.57f);<br><br>//Add text after the chart.<br>wrdRng = oDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;<br>wrdRng.InsertParagraphAfter();<br>wrdRng.InsertAfter("THE END.");<br><br>//Close this form.<br>this.Close();<br>}<br><br><br><br>使用模板<br>如果您要使用自动化功能创建的文档都是通用格式,则利用基于预设格式的模板的新文档来开始创建过程会更加容易。与从头创建文档相比,将某个模板与 Word 自动化客户端配合使用有两大优点: ? 您可以对整个文档中的对象的格式设置和布局施加更多控制。 <br>? 可以使用较少的代码创建文档。 <br>通过使用模板,可以精确地调整表格、段落和其他对象在文档中的布局,并可为这些对象添加格式设置。通过使用自动化功能,可以基于包含下面这样的代码的模板创建新文档: 在模板中,可以定义书签,这样,自动化客户端就可以在文档的特定位置加入可变文本,如下所示: 使用模板的另一个优点在于,您可以创建和存储希望在运行时应用的格式样式,如下所示: - 或者 - <br><br><br>object oTemplate = "c:\\MyTemplate.dot";<br>oDoc = oWord.Documents.Add(ref oTemplate, ref oMissing,<br> ref oMissing, ref oMissing);<br> <br><br>object oBookMark = "MyBookmark";<br>oDoc.Bookmarks.Item(ref oBookMark).Range.Text = "Some Text Here";<br> <br><br>object oStyleName = "MyStyle";<br>oDoc.Bookmarks.Item(ref oBookMark).Range.set_Style(ref oStyleName);<br> <br><br>object oStyleName = "MyStyle";<br><br> <br>

2007-09-25

PDF精华

c#转化PDF文件<br>http://www.cnblogs.com/ghd258/articles/258060.html<br>http://www.qqread.com/csharp/d303946.html<br>http://www.chinabs.net/webcsharp/default.asp?infoid=436<br>http://it.54stu.com/Html/nettech/171050700.htm<br>http://nongxueyuan.cn/cbcv/35550.html<br><br>ASP.NET提供文件下载函数(支持大文件、续传、速度限制、资源占用小) <br>http://www.cnblogs.com/ghd258/articles/260236.html<br><br>ASP.NET中将数据输出到Excel 和把Excel数据读入DataGrid中 <br>http://www.cnblogs.com/ghd258/articles/258050.html<br><br>asp.net中常用方法和函数 <br>http://www.cnblogs.com/ghd258/articles/257711.html<br><br>精典浮动网页<br>http://www.menllo.com/11296/favorite<br><br>获得PDF页数<br>http://topic.csdn.net/t/20061211/14/5221920.html<br><br>读取PDF文件类容<br>http://topic.csdn.net/t/20050807/10/4193662.html<br><br>PDF电子签章<br>http://www.pdf-tools.cn/pdf/pdf_technology/pdf_2007/04062392007.html<br>http://blog.csdn.net/apcsherry/archive/2006/01/04/570141.aspx<br>http://blog.csdn.net/flamelp/archive/2006/06/30/855324.aspx

2007-09-23

打印打印-2

打印打印-2打印打印-2打印打印-2

2007-09-13

打印打印-1

打印打印打印打印打印打印打印打印打印打印打印打印打印打印打印

2007-09-13

GridView使用技巧-1

GridView使用技巧-1

2007-09-09

GridView使用技巧1

GridView使用技巧1

2007-09-09

安裝windows服務

安裝windows服務

2007-09-09

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除