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

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. 用户使用计算机从输入,[多选] 用户使用计算机从输入汉字到输出汉字的过程中,涉及到的编码有()...

    [多选] 用户使用计算机从输入汉字到输出汉字的过程中,涉及到的编码有() 更多相关问题 The mistake I made last week has been a timely reminder ...

  3. 计算机体系结构文章摘选

    谢煜波 http://blog.xieyubo.com/ <操作系统引导探究> <操作系统中任务调度的实现> <操作系统中系统调用的必要性与实现> <做一个支 ...

  4. 考试大考博经验谈:考博英语阅读理解

    北冥有鱼,其名为鲲.鲲之大,不知其几千里也:化而为鸟,其名为鹏. 鹏之背,不知其几千里也:怒而飞,其翼若垂天之云.鹏之徙于南冥也,水击三千里,抟扶摇而上者九万里--  --<庄子·内篇·逍遥游& ...

  5. 揭秘考研英语阅读理解技巧(何凯文)

    不管是2020考研还是2021级考研的你,一定看了不少经验贴: 他们从双非三跨逆袭考上了985.211: 他们只需3个月复习就过了国家线: 他们轻轻松松考研英语80分+- 每份让人羡慕的分数,都不是随 ...

  6. 【阅读笔记】机器阅读理解(中)——架构篇

    文章目录 一.MRC模型架构 总体架构 编码层 词表向量 字符编码 上下文编码 交互层 互注意力 自注意力 上下文编码 输出层 多项式选择答案生成 区间式答案 自由式答案生成 注意力机制的应用 拷贝生 ...

  7. 机器阅读理解(MRC)零基础入门级综述(一)

    目录 机器阅读理解(MRC)零基础入门级综述(一) 一.机器阅读理解(MRC)是什么? 1. 含义 2. 分类 3. 机器阅读理解(Reading Comprehension) vs. 问答(Ques ...

  8. 30万奖金海华AI挑战赛 | 用机器挑战中文阅读理解

    摘要 2021 海华 AI 挑战赛已经正式开赛,总奖金 30 万元(技术组 21 万元,中学组 9 万元). 本次比赛的主题为机器阅读理解,数据来自小学和中学语文考试中的语文阅读理解试题.其中,还包括 ...

  9. 神经机器阅读理解最新综述:方法和趋势

    作者丨刘姗姗 学校丨国防科技大学 研究方向丨自然语言处理 近年来,基于深度学习方法的机器阅读理解受到了广泛的关注.近日,来自国防科技大学的团队在arXiv上发布了预印版综述文章 Neural Mach ...

最新文章

  1. 玩转python轻松过二级_关于通话的阿里云论坛用户知识和技术交流
  2. JS原生---鼠标拖拽
  3. 阿里云debian mysql_记录下在阿里云linux上安装与配置Mysql
  4. 专科学数控还是计算机,盘点适合专科男生学的专业 哪些专业好就业
  5. vue基础入门-应用 组件实例
  6. CV新赛事|CT影像诊断新冠肺炎北京垃圾分类识别~文末有福利
  7. STM32--MPU内存保护单元(二)
  8. WIFI与WLAN区别有哪些?
  9. ssh(安全协议外壳)
  10. 30多岁的程序员仍然奋斗在一线
  11. ORACLE ORA-00600 [17059][]错误的排除
  12. ubuntu20.04 搭建tftp服务器
  13. ElasticJob‐Lite:自定义作业分片策略
  14. selenium万能选择器
  15. 马哥linux的ppt,包合集马哥linux-2016全新专用ppt mysql replication.pdf
  16. 第24章 QSPI—读写串行FLASH
  17. 计算机及应用自考好过吗,希望有经验的给我分析一下,我想自考计算机及应用!...
  18. 互联网大数据与物联网大数据的区别 你有必要了解下
  19. VEMD11940FX01光学传感器
  20. miui11开发版升级Android10,小米9透明版MIUI11开发版系统刷机包(最新固件系统升级包MIUI11.9.12.31开发版安卓10)...

热门文章

  1. R语言列表(list)与向量(numeric)的转换
  2. centos6.5 nginx1.8 php mysql,CentOS6.5 源码安装Nginx1.8 + PHP7.0.6 + MySQL5.7.12
  3. 第2节 storm实时看板案例:10、redis的安装使用回顾
  4. anacodna/python 安装 tensorflow
  5. Swift高速入门之函数
  6. BZOJ3928 [Cerc2014] Outer space invaders
  7. Entity Framework 4.1 (强转)
  8. PetShop 4.0 SQLHelper
  9. Windows Mobile 5.0
  10. 计算机考试忘记备注班级了,2012年计算机二级Access第二十五套上机试题及答案详解...