该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

Name := UserName

DocName := "Travel Request for " + Name + ", " + GetDate()

DocSumSet(DescriptiveType!; "Travel Request")

DocSumSet(DescriptiveName!; DocName)

DocSumSet(Author!; Name)

This fragment of code gets the users name (as set up in "Edit", "Preferences", "Environment" for each user), puts it and the current date into the DocName variable, sets the document summary "type" field to "Travel Request" as a document type, enters the document name into the title field (DescriptiveName!) of the document summary, and also sets the users name in the summary info. The DocName and Name variables are also available to be put into the document itself, if desired, by using the Type() macro function. I do this on every template I create, so the titles are automatically available in the file dialog without any effort on the part of the user.

Another reason I use macros instead of the prompt builder is to provide more specific field types for the data the user is to enter. The prompt builder makes all fields generic text fields. By using the Dialog Editor for a macro, you can define not only a more logical grouping of the fields (different sizes, shapes, locations), but you can use special purpose fields, such as a date field or file name field. A date field provides a pop-up calendar that the user can more easily use to enter a date; a monthly calendar pops up, and the user just clicks on the date desired (different months and years can be selected with buttons on the calendar view). Your macro gets back a date string that is already error-checked, since it must have been a valid date when chosen from a calendar. Similarly, if you want the user to enter a file name or directory that already exists, the file control provides a pop-up dialog for selecting the file, just like the dialog the user gets when opening a file for WPWin. Again, it is easier for the user to select the file name from the dialog, and the data is usually already correct (the file or directory exists) since it is selected directly from the users disk or network volume. You can also control user selections with radio buttons, check boxes, drop-down lists or list boxes, etc. If you want to make sure the user enters only one of a particular list of text strings, you can use a drop-down list and pre-define what goes into the list. These not only simplify the users selections, since the possible choices are specifically listed, but it ensures that only valid options are selected for your document or form.

Template vs. File Macros -- Which to use?

When used with corporate LAN-based templates, I select the type of macro based on how it will be used, depending mostly on maintenance issues. If the macro is general purpose, usable for more than one template (the type I usually try to write), the choice is obvious -- make it file-based so you can have one copy in the central macro directory, and any updates will correct all templates with one macro file change.

If the macro is small and is applicable only to a single template, and the template is not used frequently, keeping the macro as a template macro makes sense since it is kept with the template in one file. Also, if the template is one that users are likely to take home with them to use, keeping macros with the template makes it easier for the user -- only one file has be to copied to the home PC, and updates to the macro(s) are kept in sync with the template (updating the users template also keeps the corresponding versions of the macros with it).

However, be aware that on a central LAN-based system, all users who have used a particular template must exit from WPWin before that template in the common LAN directory can be updated. Otherwise, a file sharing error will be encountered ("file in use" type network error) while trying to overwrite the template file with an update. This can be particularly annoying with templates that are frequently used -- it is difficult to get everyone out of WP at the same time in order to do the update. This can mean after-hours efforts. For this reason, many macros that might be updated periodically would benefit from being maintained as a file macro, so you can update the macro without having to coordinate updates of the template. Macros are not kept open as long as templates, since the template is kept open as long as the user is working on a document based on that template. Also, it has been my experience that not only must the user exit the template document, but a complete exit from WPWin is needed before the template can be updated.

关于计算机英语阅读,一篇摘选的关于计算机的英语阅读材料,对大家的英语也许会有提高!...相关推荐

  1. 英语阅读理解关于计算机,一篇摘选的关于计算机的英语阅读材料,对大家的英语也许会有提高!...

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 Name := UserName DocName := "Travel Request for " + Name + ",  ...

  2. 计算机作业我家乡的变化英语作文,家乡的变化英语作文3篇

    <家乡的变化英语作文3篇>由会员分享,可在线阅读,更多相关<家乡的变化英语作文3篇(2页珍藏版)>请在装配图网上搜索. 1.great changes in my hometo ...

  3. speak 计算机英语作文,【精选】英语作文四篇

    [精选]英语作文四篇 在日常学习.工作或生活中,大家都尝试过写作文吧,写作文可以锻炼我们的独处习惯,让自己的心静下来,思考自己未来的方向.相信许多人会觉得作文很难写吧,以下是小编收集整理的英语作文4篇 ...

  4. 小学计算机打字基础知识,浅谈小学计算机教学技巧5篇

    <浅谈小学计算机教学技巧5篇>由会员分享,可在线阅读,更多相关<浅谈小学计算机教学技巧5篇(3页珍藏版)>请在装配图网上搜索. 1.浅谈小学计算机教学技巧5篇浅谈小学计算机教学 ...

  5. 如何搜索和阅读一篇论文及鉴别论文好坏

    转自 龚奇源 gongqiyuan@seu.edu.cn https://github.com/qiyuangong/How_to_Search_and_Read_a_Paper/blob/maste ...

  6. 计算机专业教师演讲稿,计算机专业演讲稿2篇

    <计算机专业演讲稿2篇>由会员分享,可在线阅读,更多相关<计算机专业演讲稿2篇(3页珍藏版)>请在人人文库网上搜索. 1.计算机专业演讲稿2篇我爱我的专业-计算机,是它带给了我 ...

  7. java-php-python-ssm-智慧校园学生选宿系统-计算机毕业设计

    java-php-python-ssm-智慧校园学生选宿系统-计算机毕业设计 java-php-python-ssm-智慧校园学生选宿系统-计算机毕业设计 本源码技术栈: 项目架构:B/S架构 开发语 ...

  8. 下学期计算机教学工作计划,计算机教学计划范文3篇

    计算机教学计划范文3篇 发布时间:2021-02-01 在科学技术日新月异发展的新时期,随着计算机的发展和普及,并且随着多媒体技术的发展,在当前的教学中使多媒体教学方式得到了普及,而多媒体教学也已经逐 ...

  9. 高校计算机基础能力测试文字处理,高校计算机基础论文3篇(共8238字).doc

    高校计算机基础论文3篇(共8238字) 高校计算机基础论文3篇(共8238字) 第一篇:高校计算机基础课程实践教学 一.面向应用的计算机基础课程实践教学模式的构建 为实现计算机基础课程教学的培养目标, ...

最新文章

  1. BoneCP 学习笔记
  2. 没有一部是烂片 香港最强水准的10部影片
  3. 支付宝五福活动抢先开始了!原来今年可以提前集
  4. 腾讯云首次披露云原生智能数据湖全景图,数据湖之争再起波澜
  5. Cobbler详解(四)——CentOS7系统导入
  6. mysql binlog 恢复
  7. 谷歌应用商店开发者注册
  8. emule最新服务器地址,关于emule 服务器列表
  9. 关于家里的宽带和无线wifi路由器的一些选择和配置
  10. 店铺消费短信通知模板
  11. kinectfusion解析_2019/02/09 对于KinectFusion 的理解
  12. 淘宝京东拼多多抖音1688苏宁淘特等关键词搜索商品API接口(关键词搜索商品API接口,关键词搜索商品列表接口,分类ID搜索商品列表接口,关键词搜索商品销量接口)
  13. eksctl 部署AWS EKS
  14. WRF模式可以做什么?天气预报、模拟分析观测气温、降水、风场、水汽和湿度、土地利用变化、土壤及近地层能量水分通量、土壤、水体、植被等相关气象变量
  15. 嵌入式系统实验——【玄武F103开发板】顺序点亮4小灯和4小灯全亮两种点亮模式、并使用KEY1控制切换点亮模式
  16. css 揭秘-读书笔记
  17. TOF深度相机数据到点云转换(一)
  18. Python盗号原理-代码实现截屏键盘记录远程发送
  19. VSCode - setting.json配置 - Prettier、Vetur格式化和ESLint检查
  20. 设备PLC远程维护控制方案,国外也能用

热门文章

  1. 在 Centos7 用Jexus服务器 运行.Net Core 只需几步
  2. .Net Core SignalR 初体验
  3. .net ef core 领域设计代码转换(上篇)
  4. Asp.Net Core 发布和部署( MacOS + Linux + Nginx )
  5. crossphp框架中,在模板中加载其他模板
  6. ArcGIS 10.2加载在线影像底图
  7. Android之ndk-build -j4
  8. realloc函数使用总结
  9. 怎样理解Linux的文件系统
  10. HTML基础之bit哥的反客为主之道(9)