也许....

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/phoubes/article/details/277071


今天,我辞职后的第二天,也算第三天吧,已经过了12点了.

正好这个时候想抽烟,又刚好没烟了,先前跟朋友聊天抽完了.正是半夜时分,楼下的店又都关了,于是就在纳闷,便在房间面东翻翻西找找,在一个旮旯的地方找到了一根烟,是"红双喜"的,不过这根烟已经受潮了,不好抽,抽起来很费劲,但是可以抽很久的.在这深夜寂静的时刻,难免会让人回想起往事,于是就一边吞云吐雾,一边回想起往事,每当往事倒带到深刻的往事时,总会深吐一口烟气,在烟气迷蒙的房间里面,我环顾了房间一周,想想也是,工作以来我都是生活在"吞云吐雾"之中.

展开阅读全文

也许对你有用

12-12

视图---excel》也可作成后台代理rnSub Click(Source As Button)rnDim session As New NotesSession rnDim db As NotesDatabase rnDim view As NotesView rnDim doc As NotesDocument rnDim excelApplication As Variant rnDim excelWorkbook As Variant rnDim excelSheet As Variant rnDim i As Integer rn'---rnDim selection As VariantrnrnSet excelApplication = CreateObject("Excel.Application") rnexcelApplication.Visible = True rn'找到excel的位置rnpath = session.getenvironmentstring("directory",True)rngzpath=path+"\"+"th.xls"rn' execelApplication.excel.open(gzpath)rnrnSet excelWorkbook = excelApplication.Workbooks.Add rnSet excelSheet = excelWorkbook.Worksheets("Sheet1") rn'定义excel的列植rnexcelSheet.Cells(1,1).Value = "姓名" rnexcelSheet.Cells(1,2).Value = "年龄" rnrni = 1 rnSet db = session.CurrentDatabase rn'定义打印的视图rnSet view = db.GetView("打印") rnSet doc = view.GetFirstDocument rnWhile Not(doc Is Nothing) rni = i + 1 rn'定义域名为“姓名”rnexcelSheet.Cells(i,1).Value = doc.姓名(0)rnexcelSheet.Cells(i,2).Value = doc.年龄(0) rnSet doc = view.GetNextDocument(doc) rnWend rn'选择a到d列rnexcelSheet.columns("a:d").select rn'excelSheet.Columns(A:g).Select rnexcelSheet.Columns("A:d").EntireColumn.AutoFit rn' excelSheet.Columns("A:d").EntireColumn.AutoFitrn'加上表格线rnexcelsheet.PageSetup.PrintGridlines = Truern'输出到打印机rnexcelWorkbook.printoutrnrn'保存的位置,防止退出提问(可能可以用excel的模版解决的更好)rnexcelWorkbook.SaveAs("Script 内容")rnexcelApplication.Quit rnSet excelApplication = Nothing rnEnd Subrnrn《表单---word》rnSub Click(Source As Button)rn' Sub print(printvar() As String,arrnum As Integer)rnDim session As New notessessionrnpath =session.getenvironmentstring("Directory",True) 'notes工作路径rn'word applicationrnDim mark As StringrnDim wordapp As VariantrnSet wordapp=createobject("word.application")rnwordapp.visible=Truernwordapp.changefileopendirectory(path)rngzpath=path+"\"+"workpage.dot"rnwordapp.documents.Open(gzpath)rnrnDim workspace As New notesuiworkspacernDim uidoc As notesuidocumentrnDim doc As notesdocumentrnSet uidoc = workspace.currentdocumentrnSet doc = uidoc.documentrnrnDim printvar() As StringrnDim arrnum As Variantrnarrnum = 10rnFor i=1 To 2rn'在word中先定义书签,mark为书签名rnmark=Trim("bookmark"+Trim(Str(i)))rnrnwordapp.activedocument.bookmarks(mark).selectrn'可改进下面一句,使得内容添近来rn' wordapp.wordbasic.insert(printvar(i))rnwordapp.wordbasic.insert("test luck test 20")rnNextrnwordapp.Activedocument.printoutrnflag=Msgbox("工作票打印已经结束。",MB_OK,"提示")rnIf flag=1 Thenrnwordapp.activedocument.close(wdnotsavechanges)rnwordapp.quit(wdnotsavechanges)rnEnd Ifrn'End Sub rnEnd Subrn 论坛

没有更多推荐了,返回首页