Word 2000 VBA编程入门与高级开发指南

5星 · 超过95%的资源 需积分: 50 65 下载量 101 浏览量 更新于2024-10-15 2 收藏 4.2MB PDF 举报
"《VBA编程手册for word.pdf》是一本深入讲解Microsoft Word 2000宏VBA编程的实用指南。该手册分为三个部分,旨在帮助用户全面理解和掌握VBA技术。 第一部分是入门级教程,专为对Word不太熟悉的读者设计,它介绍了Word 2000的基本功能,如文档编辑、排版和格式化,为新用户提供了快速上手的路径。这部分内容旨在让用户熟悉Word的操作环境,为后续的VBA学习打下坚实的基础。 第二部分是核心内容,主要讲解VBA语言的基石。这里涵盖了VBA的数据类型,例如数值、字符串、数组和对象,以及基本的语法结构,包括条件语句(如IF...ELSE...)、循环语句(如For...Next)、函数定义和调用,以及过程(Sub和Function)的创建与使用。此外,还包括了VBA的调试技巧,帮助用户识别和解决编程问题。这一部分对于想要通过VBA进行高级操作的用户来说至关重要。 第三部分则是进阶内容,聚焦于应用程序的高级开发。这部分深入探讨了如何利用VBA进行更复杂的任务,如自定义工具栏、宏编程、数据库集成、自动化工作流程等。此外,还可能涉及了面向对象编程和API调用,使读者能够创建高度定制的Word解决方案。这部分对于希望提升工作效率并扩展Word功能的专业开发者来说,提供了丰富的实战指导。 总体来说,《VBA编程手册for word.pdf》不仅适合初学者系统学习VBA,也适合有一定基础的用户查阅参考,帮助他们在日常工作中实现更高效的自动化和定制化。随着Office 2000在办公软件市场的主导地位,理解和掌握VBA成为了提升办公生产力的重要技能。"
551 浏览量
OfficeTips Home || VBA Section || General Section || Download Section || Privacy Policy Useful PowerPoint VBA code snippets More Sharing Services Share | Share on gmail Share on google Share on facebook Share on twitter Determine the current slide in the Slide View mode: Sub SlideIDX() MsgBox "The slide index of the current slide is:" & _ ActiveWindow.View.Slide.SlideIndex End Sub Determine the current slide in Slide Show mode: Sub SlideIDX() MsgBox "The slide index of the current slide is:" & _ ActivePresentation.SlideShowWindow.View.Slide.SlideIndex End Sub Difference between SlideIndex property and SlideNumber property: The SlideIndex property returns the actual position of the slide within the presentation. The SlideNumber property returns the PageNumber which will appear on that slide. This property value is dependent on "Number Slide from" option in the Page Setup. Go to Page Setup and Change the value of "Number Slide from" to 2 and then while on the 1st slide in Slide View run the following Macro Sub Difference() MsgBox "The Slide Number of the current slide is:" & _ ActiveWindow.View.Slide.SlideNumber & _ " while the Slide Index is :" & _ ActiveWindow.View.Slide.SlideIndex End Sub Macro to exit all running slide shows: Sub ExitAllShows() Do While SlideShowWindows.Count > 0 SlideShowWindows(1).View.Exit Loop End Sub Code to refresh current slide during the slide show: Sub RefreshSlide() Dim lSlideIndex As Long lSlideIndex = SlideShowWindows(1).View.CurrentShowPosition SlideShowWindows(1).View.GotoSlide lSlideIndex End Sub Code to reset animation build for the current slide during the slide show: Sub ResetSlideBuilds() Dim lSlideIndex As Long lSlideIndex = SlideShowWindows(1).View.CurrentShowPosition SlideShowWindows(1).View.GotoSlide lSlideIndex, True End Sub Insert a slide after current slide Sub InsertSlide() Dim oView As View With ActivePresentation.Slides Set oView = ActiveWindow.View oView.GotoSlide .Add(oView.Slide.SlideIndex + 1, _ ppLayoutTitleOnly).SlideIndex Set oView = Nothing End With End Sub Copyright 1999-2011 (c) Shyam Pillai. All rights reserved.