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
相关文档:
3,Return without GoSub
5,Invalid procedure call
6,Overflow
7,Out of memory
9,Subscript out of range
10,This array is fixed or temporarily locked
11,Division by zero
13,Type mismatch
14,Out of string space
16,Expression too complex
17,Cant perform requested operation
18,User int ......
转自:http://hi.baidu.com/sunward08/blog/item/cb64ac224657014dac34de2d.html
WinForm使用WebService自动升级
2009-08-08 10:49
winform程序相对web程序而言,功能更强大,编程更方便,但软件更新却相当麻烦,要到客户端一台一台地升级,面对这个实际问题,在最近的一个小项目中,本人设计了一个通过软 ......
'*************************************************************************
**说 明:永远的魔灵 by icecept(郭卫)
'**创 建 人:icecept(魔灵)
'**日 期:2009-11-15 20:27:03
'**修 改 人:icecept(魔灵)
'**版 本:V1.0.0
'**E-mail :icecept@163.com QQ:543375508
'**网 ......
VB编写托盘图标有两个要点,一是使用 Shell_NotifyIcon 函数显示图标;二是向系统注册 TaskbarCreated 消息,以便explorer崩溃时恢复托盘的图标。
首先需要增加一个模块文件,内容如下:
Public Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOT ......
Option Explicit
Private Const INTERNET_OPEN_TYPE_DIRECT = 1
Private Const scuseragent = "vb wininet"
Private Const INTERNET_FLAG_PASSIVE = &H8000000
'调用设置环境
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long ......