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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
|
'------------------------------------------------------------------------------------------------
'---RESISTANCE DU SILO---
'------------------------------------------------------------------------------------------------
With WordApp.Selection
.Paragraphs(1).Range.Style = "Titre " & Titre
.TypeText Text:="Contraintes de résistance au voilement à létat ultime du silo"
.TypeParagraph
'------------------------------------------------------------------------------------------------
'---Parois verticales du silo---
.Paragraphs(1).Range.Style = "Titre " & Titre + 1
.TypeText Text:="Parois verticales du silo"
.TypeParagraph
End With
NbP = WordDoc.Paragraphs.Count
j = k
i = j
Do While i <= DernLigne
If Cells(i, 1) = "R2" Then
k = i
i = DernLigne
End If
i = i + 1
Loop
i = 2
Do While i <= 100
If Cells(j, i) = "G" Then
Gau = i
Else
If Cells(j, i) = "D" Then
Dro = i
i = 100
End If
End If
i = i + 1
Loop
i = j
Do While i < k
If Cells(i, 2) = "D" Then Deb = i
If Cells(i, 2) = "F" Then
Fin = i
ActiveSheet.Range(Cells(Deb, Gau), Cells(Fin, Dro)).Copy
WordApp.ActiveDocument.Paragraphs(NbP).Range.Paste
WordApp.Selection.EndKey Unit:=wdStory
WordApp.Selection.TypeText Text:=""
WordApp.Selection.TypeParagraph
NbP = WordDoc.Paragraphs.Count
i = k
End If
i = i + 1
Loop
'----***********************************************************************************---
'---Compression méridienne, circonférentielle & cisaillement---
j = k
i = j
Do While i <= DernLigne
If Cells(i, 1) = "R3" Then
k = i
i = DernLigne
End If
i = i + 1
Loop
For o = 1 To 3
With WordApp.Selection
.Paragraphs(1).Range.Style = "Titre " & Titre + 2
If o = 1 Then .TypeText Text:="Compression méridienne"
If o = 2 Then .TypeText Text:="Compression circonférentielle"
If o = 3 Then .TypeText Text:="Cisaillement"
.TypeParagraph
End With
NbP = WordDoc.Paragraphs.Count
i = 2
Do While i <= 100
If Cells(j, i) = "G" & o Then
Gau = i
Else
If Cells(j, i) = "D" & o Then
Dro = i
i = 100
End If
End If
If Cells(j, i) = "VirCol" Then VirRef = i
i = i + 1
Loop
i = j
Do While i < k
If Cells(i, 2) = "D" Then Deb = i
If Cells(i, 2) = "F" Then
Fin = i
ActiveSheet.Range(Cells(Deb, Gau), Cells(Fin, Gau + 3)).Copy
Cells(DernLigne + 2, VirRef).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range(Cells(DernLigne + 2, VirRef), Cells(DernLigne + 2 + Fin - Deb, VirRef + 3)).Copy
WordApp.ActiveDocument.Paragraphs(NbP).Range.Paste
WordApp.Selection.EndKey Unit:=wdStory
WordApp.Selection.TypeText Text:=""
WordApp.Selection.TypeParagraph
NbP = WordDoc.Paragraphs.Count
Range(Cells(DernLigne + 2, VirRef), Cells(DernLigne + 2 + Fin - Deb, VirRef + 3)).Clear
End If
If Cells(i, 2) = 0 And IsEmpty(Cells(i, 2)) = False Then
Fin = i
NbVir = NbViroleS
'Premières colonnes du tableau (répétitives)
Range(Cells(Deb, VirRef), Cells(Deb + 2, VirRef + 1)).Copy
Cells(DernLigne + 2, VirRef).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range(Cells(Fin - (NbVir), VirRef), Cells(Fin, VirRef + 1)).Copy
Cells(DernLigne + 2 + 3, VirRef).Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.Wait Now + TimeValue("00:00:01")
'Colonnes de données part.1
Range(Cells(Deb, Gau), Cells(Deb + 2, Gau + 7)).Copy
Cells(DernLigne + 2, VirRef + 2).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range(Cells(Fin - (NbVir), Gau), Cells(Fin, Gau + 7)).Copy
Cells(DernLigne + 2 + 3, VirRef + 2).Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range(Cells(DernLigne + 2, VirRef), Cells((DernLigne + 2 + 3) + (NbVir), VirRef + 2 + 7)).Copy
Application.Wait Now + TimeValue("00:00:01")
WordApp.ActiveDocument.Paragraphs(NbP).Range.Paste
WordApp.Selection.EndKey Unit:=wdStory
WordApp.Selection.TypeText Text:=""
WordApp.Selection.TypeParagraph
NbP = WordDoc.Paragraphs.Count
Range(Cells(DernLigne + 2, VirRef + 2), Cells((DernLigne + 2 + 3) + (NbVir), VirRef + 2 + 7)).Clear
Application.Wait Now + TimeValue("00:00:01")
'Colonnes de données part.2
Range(Cells(Deb, Gau + 8), Cells(Deb + 2, Dro)).Copy
Cells(DernLigne + 2, VirRef + 2).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range(Cells(Fin - (NbVir), Gau + 8), Cells(Fin, Dro)).Copy
Cells(DernLigne + 2 + 3, VirRef + 2).Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Range(Cells(DernLigne + 2, VirRef), Cells((DernLigne + 2 + 3) + (NbVir), VirRef + 2 + (Dro - Gau - 7))).Copy
Application.Wait Now + TimeValue("00:00:01")
WordApp.ActiveDocument.Paragraphs(NbP).Range.Paste
WordApp.Selection.EndKey Unit:=wdStory
WordApp.Selection.TypeText Text:=""
WordApp.Selection.TypeParagraph
NbP = WordDoc.Paragraphs.Count
Range(Cells(DernLigne + 2, VirRef), Cells((DernLigne + 2 + 3) + (NbVir), VirRef + 2 + (Dro - Gau - 7))).Clear
i = k
End If
i = i + 1
Loop
Next o |
Partager