_ExternalApplication.CacheSolution method

Examines the form template in the cache and, if necessary, updates it from the published location of the form template.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Sub CacheSolution ( _
    bstrSolutionURI As String _
)
'Usage
Dim instance As _ExternalApplication
Dim bstrSolutionURI As String

instance.CacheSolution(bstrSolutionURI)
void CacheSolution(
    string bstrSolutionURI
)

Parameters

  • bstrSolutionURI
    Type: System.String

    The string value that specifies the Uniform Resource Identifier (URI) of the form template. This parameter can be specified as a form definition (.xsf) file or a form template (.xsn) file.

Remarks

If the form template that currently exists in the cache matches the form template from the published location, no caching takes place. If the computer is offline and the form is already in the cache, the cache is kept and no update will occur.

Examples

In the following example, which is written in the C# programming language, the CacheSolution method of the ExternalApplication object is used to cache an InfoPath form template

private void AutomateInfoPathForm()
{
ExternalApplication infoPath = new ExternalApplicationClass();

 // Cache an InfoPath form template.
infoPath.CacheSolution(@"\\MyServer\MyForms\MyForm.xsn");
}

Note

The above example assumes that the Microsoft.Office.Interop.InfoPath namespace is being used and that the Microsoft InfoPath 3.0 Type Library is referenced.

See also

Reference

_ExternalApplication interface

_ExternalApplication members

Microsoft.Office.Interop.InfoPath namespace