Description
Replaces tags in a given string with matching values.
Syntax
x = HDExt.ReplaceTags (ByVal sMsg As String, cTags As Collection)
Parameters
ByVal sMsg as String
Tags as Collection
Return type
String
Example
This is one of the few routines that requires an example.
Dim cTags As Collection
Dim sUserName As String
Dim oCHDExt As CHDExt
Dim sSrc As String
'...
sUserName = GetUserName()
'
'assume resource = "User <#USER#> logged into HelpDesk."
'...
Set cTags = New Collection
cTags.Add sUserName, "USER"
sSrc = oHDExt.ReplaceTags(LoadResString(icLOG), cTags)
Set cTags = Nothing
After the above code has executed, the resulting string will have had any occurrence of "<#USER#>" replaced by the value contained in the sUserName string. The main use of this function is to allow for the loading of localizable strings from a resource file and to replace tags with values, without having to worry about context. By altering the resource file, the programmer only needs to replace certain tags and does not have to worry whether the string is localized correctly.
Remarks
The collection setup for the routine contains keys (which are used to look up the tags), and the corresponding values. The delimiters in the source string need to be in the format of <#tag#>, where tag is the name of the tag to be replaced.
Description
Constructs an e-mail message from the given parameters and sends it.
Syntax
x = HDExt.SendConfirmationMail (ByVal sProfile As String, ByVal sUserAlias As String, ByVal lTrackingId As Long, ByVal sDesc As String)
Parameters
ByVal sProfile as String
ByVal sUserAlias as String
ByVal lTrackingId as Long
ByVal sDesc as String
Return type
Boolean
Remarks
Because this method uses the Collaboration Data Object (CDO), it is necessary to provide a user profile (sProfile). This profile can be found in the Mail applet in the Control Panel. See the e-mail documentation that comes with your mail system for more details on creating a profile. For users of Microsoft Outlook, the default profile is usually "Microsoft Outlook."
The lTrackingId parameter is the tracking ID of the request that is to be confirmed . The Desc field is simply a string that is appended to the prebuilt message requesting confirmation.