Aiuto automazione excel-word gestione header
Hai un problema con Excel?
Aiuto automazione excel-word gestione header
di Maredimiel data: 15/06/2010
Ciao a tutti,
premetto che sono una capra per cui le offese sono più che giustificate (anche se sarebbe come sparare sulla croce rossa :)).
nel codice sotto sono riuscito a fare dei controlli su una tabella creata in excel, l'ho copiata, ho aperto un nuovo file word, ora voglio che copi quello che ho copiato come header del word aperto...mi aiutate??
grazie in anticipo
Sub AVANTI()
'faccio i miei controlli
Sheets("Compilazione Dati OPL").Select
If Not Cells(4, 2) = 0 Then
If Not Cells(5, 2) = 0 Then
If Not Cells(6, 2) = 0 Then
If Not Cells(2, 8) = "" Then
'copio la tabella
Sheets("Header").Select
Range("A1:L10").Select
Range("L10").Activate
Selection.Copy
'apro un nuovo word
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Add
' else relativi ai controlli
Else
MsgBox ("Compilare i campi obbligatori")
End If
Else
MsgBox ("Compilare i campi obbligatori")
End If
Else
MsgBox ("Compilare i campi obbligatori")
End If
Else
MsgBox ("Compilare i campi obbligatori")
End If
End Sub |
Vuoi Approfondire?