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://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 ......
如何让幻灯片在vb的框架里播放
'Microsoft PowerPoint 9.0(Office 2000的,如果是97则是8.0) Object Library)
''Microsoft PowerPoint 11.0(Office 2003) Object Library)
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) '延时API声明
Private Sub Form_Load()
Dim ppt As New PowerPoint. ......
Option Explicit
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Const HTCAPTION = 2
Const WM_NCLBUTTONDOWN = &HA1
Pri ......
参照案例教程建立的数据库管理系统在甚多方面都存在问题。可能是新手,不管是对于大一就学过的VB编程还是这个学期刚接触的SQL,很多小问题常常出现在调试过程中。想请熟悉使用这两个平台的高手帮忙指点一下。
1.如何解决DataGrid中多个column和SQL中多个表的绑定?目的 ......
VB隐藏进程问题的讨论由来已久,效果有好有坏,反正是各有各的招,偶然机会看到planet-source一段隐藏进程的文章,作者说采用了kernel mode driver!方法,
单从技术方法而言,这是目前见到隐藏进程中最强悍的了(个人见解,井底之蛙了),不过这种东西用在正义的人手上是一个除暴安良的利器,用心叵测者就不好说了,但是技术终归是技术 ......