Hi All
I hope sommeone might be able to assist in resolving the following problem.
I stumbled accross a VBA macro that is exactly what I need to do, but in VBScript. I have begun converting it to VBScript but I am getting a "Type Mismatch" error from:
I have read a couple of things on forums and the MSDN website, the forum threads were too confusing and seemed to be indirectly related. On the MSDN website there was something about two security patches for activex that might of helped, if it was for me using the script from a usb thumb drive on different computers which might not all have these patches installed. It also demonstrates a couple of work arounds, which I have tried without success.
The code I have opens a test word document named test-doc.docx which has 10 headings using MSWords default styles (Heading 1 to Heading 5) in random order. It should then duplicate the headings found and dump them into a new word document. The following code is what I have so far.
From one post that I read astrHeadings should be declared as type variant, but VBScript variables are of type variant by default, so this made little sense to me. The code in question should return an Array so I tried dumping the crossreference items into an array without success.
Any help in resolving this problem is appreciated.
Kind regards
A very confused individual (Nimbus3)