Rich
-
Modifié le 2 avril 2017 à 21:48
RichLaFrite
Messages postés2Date d'inscriptiondimanche 2 avril 2017StatutMembreDernière intervention 3 avril 2017
-
3 avril 2017 à 20:03
Bonjour,
je souhaite controler word a partir de vb .net.
J'ai ajouter la reference microsoft word 15 library au projet.
j'ai ajouter l'instruction : Imports Word = Microsoft.Office.Interop.Word en premiere ligne de form.vb
seulement, dès la deuxieme ligne ci-dessous, une erreur apparait : "le type "word.document" est non defini" et de meme pour word.table, word.paragraph...
Avez-vous une explication?
Merci
Richard
Dim oWord As Word.Application Dim oDoc As Word.Document Dim oTable As Word.Table Dim oPara1 As Word.Paragraph, oPara2 As Word.Paragraph Dim oPara3 As Word.Paragraph, oPara4 As Word.Paragraph Dim oRng As Word.Range Dim oShape As Word.InlineShape Dim oChart As Object Dim Pos As Double
RichLaFrite
Messages postés2Date d'inscriptiondimanche 2 avril 2017StatutMembreDernière intervention 3 avril 2017 3 avril 2017 à 20:03
un element : visual studio accepte :
Dim oWord As Word.Application
Dim oDoc As Microsoft.Office.Interop.Word.Document
Dim oTable As Microsoft.Office.Interop.Word.Table
Dim oPara1 As Microsoft.Office.Interop.Word.Paragraph, oPara2 As Microsoft.Office.Interop.Word.Paragraph
Dim oPara3 As Microsoft.Office.Interop.Word.Paragraph, oPara4 As Microsoft.Office.Interop.Word.Paragraph
Dim oRng As Microsoft.Office.Interop.Word.Range
Dim oShape As Microsoft.Office.Interop.Word.InlineShape
Dim oChart As Object
Dim Pos As Double