Share via


View.Export - Méthode

Exporte la vue vers un fichier au format spécifié.

Espace de noms :  Microsoft.Office.Interop.InfoPath
Assembly :  Microsoft.Office.Interop.InfoPath (dans Microsoft.Office.Interop.InfoPath.dll)

Syntaxe

'Déclaration
Sub Export ( _
    bstrURL As String, _
    bstrFormat As String _
)
'Utilisation
Dim instance As View
Dim bstrURL As String
Dim bstrFormat As String

instance.Export(bstrURL, bstrFormat)
void Export(
    string bstrURL,
    string bstrFormat
)

Paramètres

  • bstrURL
    Type : System.String

    Emplacement du répertoire dans lequel le fichier de la vue exportée sera enregistré.

  • bstrFormat
    Type : System.String

    Format du fichier vers lequel exporter. Seule la valeur « MHT » est prise en charge.

Remarques

Si elle est utilisée dans un formulaire qui ne dispose pas d'une autorisation totale, la méthode Export renvoie une erreur « autorisation refusée ».

Exemples

Dans l'exemple suivant, la méthode Export de l'objet ViewObject est utilisée pour exporter la vue actuelle :

thisXDocument.View.Export(@"C:\MyView.mht", "MHT");

Voir aussi

Référence

View interface

View - Membres

Microsoft.Office.Interop.InfoPath - Espace de noms