01-24-2006 06:05 AM
01-24-2006 10:09 AM
Hi KC,
I've never seen this VI return an error before. What version of LabVIEW, Office, and the Report Generation Toolkit are you using? Also, can you attach a simple VI that demonstrates the behavior? What is the specific error you receive?
Let me know,
-D
P.S. - I just thought of something...I believe you need to have a printer configured in order to set header/footer information. Does your computer have a printer configured?
01-24-2006 11:34 AM
Hi Darren,
Thanks for the reply.
Yes, I have a printer configured on my PC. I'm using LV8 and office XP
Tomorrow when I am back at the office I will try the VI with LV7.1 and inform you about results and versions.
01-24-2006 11:53 AM - edited 01-24-2006 11:53 AM
Hi KC,
I just thought of something else...are you using a foreign language version of Office and/or Windows? If so, is it a language other than English, French, German, or Japanese? If so, you will need to go into vi.lib\addons\_office\word.llb\Word_auto_text_language.vi and make an edit to the VI. Specifically, you will need to add your language's translation of "Page X of Y" into the string array indexing the While Loop, and you'll need to change the '3' constant inside the loop to a '4'. To figure out the specific translation, go to word, and in the menus, choose Format > AutoFormat... > Options... > AutoText. Scroll the list and find your language's translation of "Page X of Y", and enter that identically in the string array...the case and spacing are sensitive, so make sure it matches exactly.
Of course, if you're not using a foreign language version of Office, then all this information will be helpful to somebody else searching the forums someday. 🙂
Keep me posted, and make sure to indicate the specific error you're getting in your next post (for my benefit, and for the benefit of future users searching the forums).
-D
Message Edited by Darren on 01-24-2006 11:54 AM
01-25-2006 06:13 AM - edited 01-25-2006 06:13 AM
Hi Darren,
You're right the error is comming fron the Word_auto_text_language.vi But to avoid these kind of problems we are always using english software.
The problem is that in the office installation I have the Autotext is changed The 'Header and Footer' part is not present. So the 'Page X of Y' autotext is also not present and I cannot add this because the ALT-F3 button is grayed out.
I asked for a reinstall, see how it works then and let you know.
The error message I got:
Exception occured in Microsoft Word: The requested member of the collection does not exist.Help Path is C:\Program Files\Microsoft Office\Office10\1033\wdmain10.chm and context 25421 in Word_auto_text_language.vi->Word_auto_text_entry (for page number).vi->Word Set Page Numbering.vi->Page numbers.vi
With number: -2146822347
Message Edited by K C on 01-25-2006 01:25 PM
Message Edited by K C on 01-25-2006 01:25 PM
01-25-2006 09:54 AM
Hi KC,
Yes, that would definitely cause a problem if "Page X of Y" is not present in the Autotext entries list. I hope the Office repair/reinstall fixes your problem. Note that this is a limitation of the ActiveX interface to Word...if you want page numbers in the form of "Page X of Y", the *only* way to accomplish this through ActiveX is to use the AutoText feature.
Good luck,
-D
01-26-2006 03:27 AM - edited 01-26-2006 03:27 AM
Hi Darren,
It's working now. But a remove and reinstall didn't do the trick.
It was one of the settings in the normal.dot file. Just remove the normal.dot file and the autotext items are back again (Word creates a new normal.dot file)
Thanks for your support
Message Edited by K C on 01-26-2006 10:28 AM