Private Sub CommandButton output notification to the Word file _Click ()
Dim Word objects As the New Word. The Application, the current path, the export file name, the export path to the file name, I, j
Dim Str1, Str2
The current Path=ThisWorkbook. Path
The last line number=Sheets (" data "). The Range (" B65536 "). The End (xlUp). Row
Judge=0
For I=2 To the last line number
The export file name="standard specification -
"FileCopy current path & amp; "\ templates. Docx", the current path & amp; "" & amp; The export file name & amp; Sheets (" data "). The Range (" A "& amp; I) & amp; "Doc"
The export path to the file name=current path & amp; "" & amp; The export file name & amp; Sheets (" data "). The Range (" A "& amp; I) & amp; "Doc"
With the Word object
Derived. The Documents. The Open path to the file name
The Visible=False
With ActiveDocument. Sections (4). The Headers (wdHeaderFooterPrimary) 'call for the second time in the following 462
. Range. The Text=VBA. Replace (. Range. The Text, "project name", Sheets (" data "). The Range (" A "& amp; I). The Text, 1, 1, vbTextCompare)
End With
The Do While. Selection. Find the Execute (" project name ") 'the keywords, finding customers to replace it with the edge of the table name
. The Selection. The Text=Sheets (" data "). The Range (" A "& amp; I). The Text
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" design number value ")
. The Selection. The Text=Sheets (" data "). The Range (" E "& amp; I). The Text
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" project code ")
. The Selection. The Text=Sheets (" data "). The Range (" F "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" a ")
. The Selection. The Text=Sheets (" data "). The Range (" G "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" 2 ")
. The Selection. The Text=Sheets (" data "). The Range (" H "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" description ")
. The Selection. The Text=Sheets (" data "). The Range (" I "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" project total investment value ")
. The Selection. The Text=Sheets (" data "). The Range (" J "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" value "project installation cost)
. The Selection. The Text=Sheets (" data "). The Range (" K "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" equipment purchase expense value ")
. The Selection. The Text=Sheets (" data "). The Range (" L "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" survey and design values ")
. The Selection. The Text=Sheets (" data "). The Range (" M "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" geological exploration cost value ")
. The Selection. The Text=Sheets (" data "). The Range (" N "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" detect cost value ")
. The Selection. The Text=Sheets (" data "). The Range (" O "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" project supervision fee value ")
. The Selection. The Text=Sheets (" data "). The Range (" P "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" safety production costs value ")
. The Selection. The Text=Sheets (" data "). The Range (" Q "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" institutions audit value ")
. The Selection. The Text=Sheets (" data "). The Range (" R "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" base station computer room decoration value ")
. The Selection. The Text=Sheets (" data "). The Range (" S "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" announced the introduction of value ")
. The Selection. The Text=Sheets (" data "). The Range (" T "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" location fee value ")
. The Selection. The Text=Sheets (" data "). The Range (" U "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" total "VAT)
. The Selection. The Text=Sheets (" data "). The Range (" W "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" equipment taxes ")
. The Selection. The Text=Sheets (" data "). The Range (" X "& amp; I). The Text
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" survey and taxes ")
. The Selection. The Text=Sheets (" data "). The Range (" Y "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" geological exploration taxes ")
. The Selection. The Text=Sheets (" data "). The Range (" Z "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" detect cost taxes ")
. The Selection. The Text=Sheets (" data "). The Range (" AA "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" supervision fee to tax ")
. The Selection. The Text=Sheets (" data "). The Range (" AB "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" audit fee taxes ")
. The Selection. The Text=Sheets (" data "). The Range (" AC "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" address ")
. The Selection. The Text=Sheets (" data "). The Range (" D "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
The Do While. Selection. Find the Execute (" longitude values ")
. The Selection. The Text=Sheets (" data "). The Range (" B "& amp; I). The Text 'replacement string
. The Selection. The HomeKey Unit:
=6Loop
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull