VB操作WORD
Dim wdapp As Word.Application
Dim wddoc As Word.Document
Dim wdtable As Word.Table
Set wdapp = CreateObject("word.application")
Set wddoc = wdapp.Documents.Add
wdapp.Visible = True
wdapp.Activate
wdapp.Caption = "ICU人员排班表"
wdapp.Selection.Font.Name = "宋体"
wdapp.Selection.Font.Size = 22
wdapp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
wdapp.Selection.TypeText Text:="标题"
wdapp.Selection.TypeParagraph
wdapp.Selection.TypeParagraph
wdapp.Selection.Font.Name = "宋体"
wdapp.Selection.Font.Size = 20
'添加表格
Set wdtable = wdapp.ActiveDocument.Tables.Add(wdapp.Application.Selection.Range, Grid1.Rows, NumColumns _
:=8, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed)
wdtable.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
wdtable.Range.Font.Name = "宋体"
wdtable.Range.Font.Size = 10.5
wdtable.Cell(1, 1).Range.Text = "姓名"
wdtable.Cell(1, 2).Range.InsertAfter "星期一"
wdtable.Cell(1, 3).Range.InsertAfter "星期二"
wdtable.Cell(1, 4).Range.InsertAfter "星期三"
wdtable.Cell(1, 5).Range.InsertAfter "星期四"
wdtable.Cell(1, 6).Ra
相关文档:
转自:http://hi.baidu.com/sunward08/blog/item/cb64ac224657014dac34de2d.html
WinForm使用WebService自动升级
2009-08-08 10:49
winform程序相对web程序而言,功能更强大,编程更方便,但软件更新却相当麻烦,要到客户端一台一台地升级,面对这个实际问题,在最近的一个小项目中,本人设计了一个通过软 ......
VB 字符串处理函数集
收藏
mid(字符串,从第几个开始,长度)
在[字符串]中[从第几个开始]取出[长度个字符串]
例如 mid("小欣无敌",1,3) 则返回 "小欣无"
instr(从第几个开始,字符串1,字符串2)
从规定的位置开始查找 ......
http://blog.donews.com/sloo/archive/2006/01/29/711269.aspx
1.用Microsoft Internet Transfer Control 控件(在部件中添加),代码非常简单,如下(在form上添加一个Inet1和Text1和Command1):
Private Sub Command1_Click()
Text1.Text = Inet1.OpenURL("http://www.vbgood.com/")
End Sub
2.如果是使用 W ......
http://tieba.baidu.com/f?kz=580219489
http://www.anqn.com/vb/154/8974.shtml
http://www.codefans.net/soft/5089.shtml
http://www.mndsoft.com/blog/article.asp?id=1121
http://topic.csdn.net/t/20020113/14/474848.html
直接运行网页中的JavaScript:
function alllefttab()
WebBrowser1.Document.par ......
'代码:
Option Explicit
'======================用于查找进程和终止进程的API函数常数定义================ =====
Private Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, ByVal lProcessID As Long) As Long
Private Declare Function ProcessF ......