VBA通过Outlook信件,如何设置信件的importance为High呢?

geng3stone geng3stone 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Microsoft Press-Programming Microsoft Outlook And Exchange 2003 (2 of 2) Chapter 1: An Introduction to Outlook 2007 Programming 1 Setting Up Outlook VBA 1 Setting Up Macro Security 2 Creating a Code-Signing Certificate 3 Reviewing the VBA Editor Interface and Options 4 Understanding Outlook 5 Outlook Profiles and Data Store 6 Outlook Sessions and Data Stores 6 Outlook Folders 6 Outlook Items 8 Outlook Data Storage 8 Accessing Data Stores Using NameSpace 9 Accessing Data with Tables 9 Outlook Data Display 10 Summary 11 Chapter 2: What’s New in Outlook 2007 13 The Unified Object Model 14 The PropertyAccessor 14 Stores and Storage Items 24 User Interface Objects 26 Accounts 28 Performance Improvements 30 Working with Tables Instead of Items 30 Filtering Tables 31 Table Default Columns 33 Table Limitations 33 Security 34 Trusted Code 35 Untrusted Code 35 The Importance of Using DASL 35 DASL Namespaces 36 Using DASL and JET Syntax 36 Summary 38 Chapter 3: Outlook Development 39 The Application Object 39 New Methods, Properties, and Events 44 Other Important Collections, Methods, Properties, and Events 48 The NameSpace Object 53 Exchange 53 Categories 54 Picking Folders 54 Picking Names 55 Summary 57 Chapter 4: Outlook VBA 59 The Outlook VBA Project 59 The Project File 59 ThisOutlookSession 60 Macros and VBA Procedures 60 Macro Security 60 Security Levels 61 Signed Macro Code 61 Class Modules 61 ThisOutlookSession 62 User Classes 62 Code Modules 63 Office UserForms 64 Creating the Macro User Interface 64 Working with Outlook Events 68 Application Events 69 Folder Events 77 User Events 80 Wrapper Classes and Collections 81 Macro Projects 88 Custom Rules 89 Additional Macros 100 Running and Distributing Macros 108 Running Macros 108 Distributing the VBA Project 109 Distributing Individual Macros 110 Summary 110 Chapter 5: Outlook Forms 111 Working with Standard Forms 111 Forms Libraries 112 Published Forms 113 Form Customization 113 Advantages and Disadvantages of Custom Forms 114 Back to the Past: the Forms Development Environment 116 Using the Field Chooser 118 Using the Control Toolbox 119 Using the Code Window 120 Prototyping Forms Code in VBA 122 Simulating the Form Environment in VBA 123 Developing and Debugging Using VBA 124 Custom Form Walkthrough 124 Creating, Publishing, and Running a Form 125 Where to Publish Forms 129 Publishing Forms Using Code 129 Testing Code for the Form 132 Forms Management 136 Form Behavior 138 Trusted Forms 138 Active X Controls 138 Script in Forms 139 Form Regions 139 Form Region Locations, Properties, and Registry Settings 140 Form Region Walkthrough 141 Summary 145 Chapter 6: COM Addins 147 Managed or Unmanaged Code? 147 IDTExtensibility2 and Trusted COM Addins 148 Version Differences 149 VB.NET Addin Implementations 149 C# Addin Implementations 150 Addin Templates 151 Explorer and Inspector Event Handlers 152 Setting Up Explorer and Inspector Event Handlers 152 The OnDisconnection Catch-22 Bug 155 Explorer and Inspector Wrappers 164 Template Utility Code 179 VB.NET Utility Code 180 C# Utility Code 182 Displaying Outlook Property Pages 185 Displaying Property Pages with VB.NET 185 Displaying Property Pages with C# 186 Communicating with a COM Addin 188 VB.NET 188 Testing Addin Communications 189 C# 190 VSTO with VB.NET 191 VSTO with C# 194 Summary 196 Chapter 7: COM Addins and the Outlook User Interface 197 Working with Menus and Toolbars 197 Menus and Toolbars in Explorers 198 VB.NET 199 C# 206 VSTO Interface Handlers 213 VB.NET 213 C# 214 AxHost 216 VB.NET 216 C# 216 Working with the Ribbon 217 Ribbon XML 218 Ribbon Callbacks 224 Custom Task Panes 234 Creating Custom Task Panes 235 Working with Custom Task Panes 239 Form Regions 240 Creating Custom Form Regions 242 Working with Custom Form Regions 244 Custom Views 248 Types of Custom Views 248 Creating Custom Views 248 Filtering and Formatting Custom Views 249 View XML 250 Summary 251 Chapter 8: Interfacing Outlook with Other Applications 253 Microsoft Word 254 Microsoft Excel 257 Microsoft Access 264 ADO 265 Access DAO 267 DAO DBEngine 268 Web Browser 269 Browser Control Form 269 Summary 272 Chapter 9: Real-World Outlook Programming 275 Supporting Multiple Versions of Outlook 275 Coding for Compatibility 276 Ribbon Considerations and Workarounds 277 Addin Deployment 279 Unmanaged Code Addins 279 Managed Code Addins 280 Outlook Programming Limitations 282 Outlook 2007 282 Outlook 2003 and Earlier 283 Things We Still Don’t Have in Outlook 2007 287 Using Alternate APIs 288 CDO 288 Redemption 289 Summary 303 Chapter 10: Task Management System 305 Task Management System Features 305 The Connect Class 307 The VB Connect Class 307 The C# Connect Class 319 C# MyAxHost 335 VB Globals 337 VB OutExpl 337 C# OutExpl 338 VB ExplWrap 340 C# ExplWrap 341 VB OutInsp 344 C# OutInsp 345 VB InspWrap 347 C# InspWrap 353 VB TaskPane 362 C# TaskPane 366 VB Ribbon XML 372 C# Ribbon XML 373 Summary 373 Appendix A: Outlook 2007 Object Model Summary 375 Appendix B: Troubleshooting Problems and Support 425 Index 439 立即下载
如题,编写了如下代码,一个发信的函数
已经加入.Importance = olImportanceHigh,但是发出的邮件的Importance却变成了low?
这是怎么回事呢?谢谢大家~~

Function sendemail2(address)

On Error GoTo errhandler
Application.ScreenUpdating = False
Dim signature As String
Dim sigstring As String
Dim objOL As Object
Dim itmNewMail As Object
sigstring = "D:\Documents and Settings\rgeng\Application Data\Microsoft\Signatures\robbie geng.txt"
If Dir(sigstring) <> "" Then
signature = GetBoiler(sigstring)
Else
signature = ""
End If
Set objOL = CreateObject("Outlook.Application")
Set itmNewMail = objOL.CreateItem(olMailItem)

With itmNewMail

.To = address
.CC = ""
.Importance = olImportanceHigh
.Subject = "Virus Infected"
.Body = "Hi all," & vbCrLf & vbCrLf & "As you ......" _
& vbCrLf & vbCrLf & signature



.Save

.Send
'On Error GoTo 0
Set objOL = Nothing
Set itmNewMail = Nothing
End With


Application.ScreenUpdating = True

errhandler:

MsgBox Err.Description


End Function
...全文
Microsoft Press-Programming Microsoft Outlook And Exchange 2003 (1 of 2) Chapter 1: An Introduction to Outlook 2007 Programming 1 Setting Up Outlook VBA 1 Setting Up Macro Security 2 Creating a Code-Signing Certificate 3 Reviewing the VBA Editor Interface and Options 4 Understanding Outlook 5 Outlook Profiles and Data Store 6 Outlook Sessions and Data Stores 6 Outlook Folders 6 Outlook Items 8 Outlook Data Storage 8 Accessing Data Stores Using NameSpace 9 Accessing Data with Tables 9 Outlook Data Display 10 Summary 11 Chapter 2: What’s New in Outlook 2007 13 The Unified Object Model 14 The PropertyAccessor 14 Stores and Storage Items 24 User Interface Objects 26 Accounts 28 Performance Improvements 30 Working with Tables Instead of Items 30 Filtering Tables 31 Table Default Columns 33 Table Limitations 33 Security 34 Trusted Code 35 Untrusted Code 35 The Importance of Using DASL 35 DASL Namespaces 36 Using DASL and JET Syntax 36 Summary 38 Chapter 3: Outlook Development 39 The Application Object 39 New Methods, Properties, and Events 44 Other Important Collections, Methods, Properties, and Events 48 The NameSpace Object 53 Exchange 53 Categories 54 Picking Folders 54 Picking Names 55 Summary 57 Chapter 4: Outlook VBA 59 The Outlook VBA Project 59 The Project File 59 ThisOutlookSession 60 Macros and VBA Procedures 60 Macro Security 60 Security Levels 61 Signed Macro Code 61 Class Modules 61 ThisOutlookSession 62 User Classes 62 Code Modules 63 Office UserForms 64 Creating the Macro User Interface 64 Working with Outlook Events 68 Application Events 69 Folder Events 77 User Events 80 Wrapper Classes and Collections 81 Macro Projects 88 Custom Rules 89 Additional Macros 100 Running and Distributing Macros 108 Running Macros 108 Distributing the VBA Project 109 Distributing Individual Macros 110 Summary 110 Chapter 5: Outlook Forms 111 Working with Standard Forms 111 Forms Libraries 112 Published Forms 113 Form Customization 113 Advantages and Disadvantages of Custom Forms 114 Back to the Past: the Forms Development Environment 116 Using the Field Chooser 118 Using the Control Toolbox 119 Using the Code Window 120 Prototyping Forms Code in VBA 122 Simulating the Form Environment in VBA 123 Developing and Debugging Using VBA 124 Custom Form Walkthrough 124 Creating, Publishing, and Running a Form 125 Where to Publish Forms 129 Publishing Forms Using Code 129 Testing Code for the Form 132 Forms Management 136 Form Behavior 138 Trusted Forms 138 Active X Controls 138 Script in Forms 139 Form Regions 139 Form Region Locations, Properties, and Registry Settings 140 Form Region Walkthrough 141 Summary 145 Chapter 6: COM Addins 147 Managed or Unmanaged Code? 147 IDTExtensibility2 and Trusted COM Addins 148 Version Differences 149 VB.NET Addin Implementations 149 C# Addin Implementations 150 Addin Templates 151 Explorer and Inspector Event Handlers 152 Setting Up Explorer and Inspector Event Handlers 152 The OnDisconnection Catch-22 Bug 155 Explorer and Inspector Wrappers 164 Template Utility Code 179 VB.NET Utility Code 180 C# Utility Code 182 Displaying Outlook Property Pages 185 Displaying Property Pages with VB.NET 185 Displaying Property Pages with C# 186 Communicating with a COM Addin 188 VB.NET 188 Testing Addin Communications 189 C# 190 VSTO with VB.NET 191 VSTO with C# 194 Summary 196 Chapter 7: COM Addins and the Outlook User Interface 197 Working with Menus and Toolbars 197 Menus and Toolbars in Explorers 198 VB.NET 199 C# 206 VSTO Interface Handlers 213 VB.NET 213 C# 214 AxHost 216 VB.NET 216 C# 216 Working with the Ribbon 217 Ribbon XML 218 Ribbon Callbacks 224 Custom Task Panes 234 Creating Custom Task Panes 235 Working with Custom Task Panes 239 Form Regions 240 Creating Custom Form Regions 242 Working with Custom Form Regions 244 Custom Views 248 Types of Custom Views 248 Creating Custom Views 248 Filtering and Formatting Custom Views 249 View XML 250 Summary 251 Chapter 8: Interfacing Outlook with Other Applications 253 Microsoft Word 254 Microsoft Excel 257 Microsoft Access 264 ADO 265 Access DAO 267 DAO DBEngine 268 Web Browser 269 Browser Control Form 269 Summary 272 Chapter 9: Real-World Outlook Programming 275 Supporting Multiple Versions of Outlook 275 Coding for Compatibility 276 Ribbon Considerations and Workarounds 277 Addin Deployment 279 Unmanaged Code Addins 279 Managed Code Addins 280 Outlook Programming Limitations 282 Outlook 2007 282 Outlook 2003 and Earlier 283 Things We Still Don’t Have in Outlook 2007 287 Using Alternate APIs 288 CDO 288 Redemption 289 Summary 303 Chapter 10: Task Management System 305 Task Management System Features 305 The Connect Class 307 The VB Connect Class 307 The C# Connect Class 319 C# MyAxHost 335 VB Globals 337 VB OutExpl 337 C# OutExpl 338 VB ExplWrap 340 C# ExplWrap 341 VB OutInsp 344 C# OutInsp 345 VB InspWrap 347 C# InspWrap 353 VB TaskPane 362 C# TaskPane 366 VB Ribbon XML 372 C# Ribbon XML 373 Summary 373 Appendix A: Outlook 2007 Object Model Summary 375 Appendix B: Troubleshooting Problems and Support 425 Index 439 立即下载

相关推荐

广东屈臣氏饮料制造项目-全专业-20240508.nwd

广东屈臣氏饮料制造项目_全专业-20240508.nwd

meslog

Python3 if多条件简写技巧

Python3支持极简if条件写法,简化冗余代码。链式比较:原生支持1<x<10,无需写成x>1 and x<10,可读性更强。三元表达式:适用于二分支逻辑,语法 结果A if 条件 else 结果B,适合单行赋值,禁止多层嵌套三元表达式,会大幅降低可读性。逻辑短路:and左侧为False直接终止判断,or左侧为True直接终止判断,可用于空值兜底,比如name = input_name or "匿名用户"。注意不要混用=和==,新手常误将赋值写在if判断内,Python3会直接抛出语法异常。 6thhosp-east.com 3wfuwu.com ajfcw.net www.ahdmhbkj.cn www.aiyouseo.com

2601_97221235

PHP 代码加密工具 源码保护与站点授权

把 PHP 源码加密成不可直接阅读、难以还原的形式:变量名与控制流被打散重写,载荷带完整性自校验,改一个字节就停止运行。提供编码型 / 混淆型 / 重构型 / 底层型 / 虚拟机型五档保护强度,并可叠加按域名与期限的网站注册授权。

穿透云

【配电网智能软开关和储能联合规划】具有源荷不平衡特性的配电网智能软开关和储能联合规划(Matlab代码实现)

【配电网智能软开关和储能联合规划】具有源荷不平衡特性的配电网智能软开关和储能联合规划(Matlab代码实现)内容概要:本文围绕“具有源荷不平衡特性的配电网智能软开关和储能联合规划”展开,提出了一种结合智能软开关(SOP)与储能系统进行联合优化配置的方法,旨在应对配电网中由于分布式能源波动导致的源荷不平衡问题。该研究利用Matlab实现了完整的仿真代码,构建了优化模型,综合考虑了设备投资成本、运行维护费用、网络损耗及电能质量等因素,通过优化算法求解SOP和储能的最佳配置方案,以提升配电网的灵活性、可靠性和经济性。文中强调该模型为顶级EI复现级别,具备较高的学术参考价值和技术实现细节。; 适合人群:从事电力系统规划、智能电网、分布式能源管理及相关领域的科研人员、高校研究生以及电力行业工程师。; 使用场景及目标:① 用于解决含高比例分布式电源的配电网中因出力波动引起的潮流倒送、电压越限等问题;② 为智能软开关与储能系统的协同配置提供量化决策依据,实现电网灵活资源的优化布局。; 阅读建议:此资源以Matlab代码为核心,重在理论模型与工程实践的结合,建议读者在学习时应同步运行代码,深入理解目标函数构建、约束条件设置及优化求解过程,以便更好地掌握其在实际项目中的应用方法。

程序猿鑫

MATLAB实现三线径向配电系统的前后扫负载流和故障分析.zip

1.版本:matlab2014a/2019b/2024b 2.附赠案例数据可直接运行。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。

海神之光
评论 4
收藏 已收藏
分享
返回顶部
geng3stone
Office开发/ VBA 5,174 成员 17,906 内容