Home > other >  Consult a specific character in the use of word form to rename word document the problem! Thank god!
Consult a specific character in the use of word form to rename word document the problem! Thank god!

Time:09-26

Everyone a great god, rookie consult a problem:
I now have about 5000 word file, need to rename!
Naming rules is a field in the file form
Due to the irregular file, this field is not all on the same line
Characteristic of this field is the name of the drug that cell behind! Please teachers teach
Use drug names behind the cell to rename word file! Thank you



CodePudding user response:

Each word file is a word form to take drugs to name the folder name at the back of the field

CodePudding user response:

1) provide a sample,
2) half an hour to come, Suggestions or paid, this response will be more,

CodePudding user response:

Suggestions in view of the above that figure, you give a nominal effect, which is 2 floor sample, or light understand you this requirement will nullify the old time, still can not understand to,

CodePudding user response:

The for... (don't know what is your method of file name, can be a directory, array can be... )
OWordDoc=oWordApp. Open (... )
For each uRow as Word. Row in oWordDoc. Tables (... ). Rows
If uRow. Cell (1). The range. The text="drug name" then
OWordDoc. SaveAs2 (uRow. Cell (2) range. The text)
The exit for
End the if
Next
OWordDoc. Close (SaveChange:=false)

  • Related