プライマリ・コンテンツへ移動
Oracle® Smart View for Office開発者ガイド

F11927-01
目次に移動
目次

前
次

ListTemplates

説明

ListTemplates()は、使用可能なすべての仕訳テンプレートをリストします。

構文

Function ListTemplates(

templateType() As String,

templateName() As String

) As Long

パラメータ

templateType: 出力引数。使用可能なテンプレート・タイプ(標準または繰返し)を文字列の配列として戻します。

templateName: 出力引数。テンプレート名を文字列の配列として戻します。

戻り値

正常に終了した場合は0を戻し、それ以外の場合は該当するエラー・コードを戻します。

Public Declare Function HypConnect Lib "HsAddin" (ByVal vtSheetName As Variant, ByVal vtUserName As Variant, ByVal vtPassword As Variant, ByVal vtFriendlyName As Variant) As Long
Sub TestListTemplates
‘Connect to an HFM data source
HypConnect “Sheet1”, “admin”, “password”, “connName”

Set jObj = New JournalVBA
     	jObj.UseActiveConnectionContext
    
    	Dim templateType() As String
    	Dim templateName() As String
    
    	retVal = jObj.ListTemplates(templateType, templateName)
    
    	If retVal = 0 Then
        Debug.Print "Following are the Template types and their names..."
        Debug.Print "Type        Name"
        Dim i As Integer
        For i = 0 To UBound(templateType)
            Debug.Print Spc(5); templateType(i); Spc(10); templateName(i)
        Next
    	Else
        Debug.Print "ListTemplates Failed!!!"
    	End If
End Sub