Bonjour

Voici mon probleme
Voici le code de ma macro

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Sub ouvrir()
Dim WApp As Word.Application
Dim WDoc As Word.Document
doca = "R" & ActiveCell.Value
Set WApp = CreateObject("Word.Application")
Set WDoc = WApp.Documents.Open("D:\acrf\docacrf\" & doca & ".docx")
da = "ACRF cours de cuisine   Madame Claudine Martin    " & MonthName(Month(ActiveCell.Offset(0, 4).Value)) & "   " & Year(ActiveCell.Offset(0, 4).Value)
With WDoc.Sections(1)
.Footers(wdHeaderFooterPrimary).Range.Text = da
.Footers(wdHeaderFooterPrimary).Range.Paragraphs.Alignment = wdAlignParagraphCenter
End With
Range("A1").Select
WApp.Visible = True
WApp.WindowState = wdWindowStateMaximize
WApp.Activate
WDoc.Activate
End Sub

cette macro fonctionne très bien sauf que word ne s'affiche pas au premier plan
bizarrement si après l'ouverture du classeur j'ouvre puis je ferme la fenêtre vba
cela fonctionne et word vient au premier plan !!!!!!!!!!!!!

si qqn peut m'aider merci d'avance

amarchal