我想用worddoc.builtInDocumentProperties来设置WORD文档的属性,比如作者,标题等,但不会用这个函数,请高手指点。
解决方案 »
- SKINSE界面库怎么响应directui自定义消息?
- 做一个多媒体播放器界面的具体步骤
- GetSubItemRect(-1,0 LVIR_BOUNDS, crect);参数已经为-1居然rect有正常的值
- opengl中纹理的处理(扰动、扭曲、倾斜)
- 求psapi.h和paapi.lib等文件
- 一个关于文件序列化的问题
- 关于最大连接数的探讨
- 我的毕业设计要求做网络即时通信,就像QQ一样。
- 窗口破坏过程与Windows消息循环的补充,增加了对WM_NCDESTROY的处理, 感谢 lily311
- 中国1-0击败阿曼 首次进入世界杯 !!!!!!!!!!
- 到哪可以下载到MCSE的模拟题??
- 高分求救,怎么通过捕捉到的报文得到协议类型
lngPropType As Long, _
Optional varPropValue As Variant = "", _
Optional blnLinkToContent As Boolean = False, _
Optional varLinkSource As Variant = "") _
As Long
' This procedure adds the custom property specified in the strPropName
' argument. If the blnLinkToContent argument is True, the custom
' property is linked to the location specified by varLinkSource.
' The procedure first checks for missing or inconsistent input parameters.
' For example, a value must be provided unless the property is linked, and
' when you are using linked properties, the source of the link must be provided. Dim prpDocProp As DocumentProperty
' Validate data supplied in arguments to this procedure.
If blnLinkToContent = False And Len(varPropValue) = 0 Then
' No value supplied for custom property.
AddCustomDocumentProperty = ERR_CUSTOM_LINKTOCONTENT_VALUE
Exit Function
ElseIf blnLinkToContent = True And Len(varLinkSource) = 0 Then
' No source provided for LinkToContent scenario.
AddCustomDocumentProperty = ERR_CUSTOM_LINKTOCONTENT_LINKSOURCE
Exit Function
ElseIf lngPropType < msoPropertyTypeNumber Or _
lngPropType > msoPropertyTypeFloat Then
' Invalid value for data type specifier. Must be one of the
' msoDocProperties enumerated constants.
AddCustomDocumentProperty = ERR_CUSTOM_INVALID_DATATYPE
Exit Function
ElseIf Len(strPropName) = 0 Then
' No name supplied for new custom property.
AddCustomDocumentProperty = ERR_CUSTOM_INVALID_PROPNAME
Exit Function
End If
Call DeleteIfExisting(strPropName) Select Case blnLinkToContent
Case True
Set prpDocProp = ActiveWorkbook.CustomDocumentProperties _
.Add(Name:=strPropName, LinkToContent:=blnLinkToContent, _
Type:=lngPropType, LinkSource:=varLinkSource)
ActiveWorkbook.Save
Case False
Set prpDocProp = ActiveWorkbook.CustomDocumentProperties. _
Add(Name:=strPropName, LinkToContent:=blnLinkToContent, _
Type:=lngPropType, Value:=varPropValue)
End Select
End Function
Title, Subject, Author, Keywords, Comments, Template, Last Author,
Revision Number, Application Name, Last Print Date, Creation Date,
Last Save Time, Total Editing Time, Number of Pages, Number of Words,
Number of Characters, Security, Category, Format, Manager, Company,
Number of Bytes, Number of Lines, Number of Paragraphs, Number of Slides, Number of Notes, Number of Hidden Slides, Number of Multimedia Clips, Hyperlink Base, Number of Characters (with spaces)比如,改作者:
ActiveDocument.BuiltInDocumentProperties(wdPropertyAuthor) = "L291118 (L291118)"