Hello friends,
I am just working on a tool that will process batches of Word documents.
In order to secure correct processing, I want to first open each document in Word 2003 with "Open and repair", and replace the attached template with "Normal.dot".
Strangely, it will not function. VB (or probably rather Word) hangs on execution of the bolded line:
I have pre-checked, that the Word application is being initiated and that the version of the Word instance is 11.
Can you tell me what I'm doing wrong?
Thanks!
Andy
[blue]Help us, join us, participate
IAHRA - International Alliance of Human Rights Advocates[/blue]
I am just working on a tool that will process batches of Word documents.
In order to secure correct processing, I want to first open each document in Word 2003 with "Open and repair", and replace the attached template with "Normal.dot".
Strangely, it will not function. VB (or probably rather Word) hangs on execution of the bolded line:
Code:
[b]Set doc = wrd.Documents.Open(FileName:=TheFile, OpenAndRepair:=True)[/b]
doc.AttachedTemplate = "Normal"
doc.Close SaveChanges:=True
I have pre-checked, that the Word application is being initiated and that the version of the Word instance is 11.
Can you tell me what I'm doing wrong?
Thanks!
Andy
[blue]Help us, join us, participate
IAHRA - International Alliance of Human Rights Advocates[/blue]