Bonjour,
comment puis-je ramener l'affichage à ma fenêtre excel après ouverture d'un fichier Word par une macro.
Pour info, je souhaite que la tache Word soit visible.
Voici mon code
merci.
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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 Sub Open_German_Model() ' Windows(Master_workbook).Activate Sheets("Tools").Select If Not CheckWordFileOpen(Bonus_German_Model_File) Then 'ouvre session word 'Set Bonus_WordApp = New Word.Application 'ouvre du document Word Set Bonus_Word_German = Bonus_WordApp.Documents.Open(Bonus_German_Model_File) Bonus_WordApp.Visible = True End If Windows(Master_workbook).Activate Sheets("Tools").Select Check_German_Model_Opened End Sub Sub Check_German_Model_Opened() ' Bonus_German_Model_File_Cell = "G26" Bonus_German_Model_File_Status_Cell = "G34" Windows(Master_workbook).Activate Sheets("Tools").Select Bonus_German_Model_File = Range(Bonus_German_Model_File_Cell).Value If CheckWordFileOpen(Bonus_German_Model_File) Then Range(Bonus_German_Model_File_Status_Cell).Value = "*OPENED*" Range(Bonus_German_Model_File_Status_Cell).HorizontalAlignment = xlCenter Else Range(Bonus_German_Model_File_Status_Cell).Value = "*CLOSED*" Range(Bonus_German_Model_File_Status_Cell).HorizontalAlignment = xlLeft End If End Sub
Sorry j'avais omis de publier le code.
j'ai ajusté.
Partager