PDA

View Full Version : Problem with Autotext macro in 2007



xeem22
02-18-2009, 09:34 AM
I'm having problems with a Macro that is working fine in 2003 but causes the error "The requested member of the connection does not exist".

Im trying to insert autotext from an addin, here is the code

Public Temp As Template
Set Temp = Templates("Q:\QA Mecanix\Word\Addins\Mecanix.dot")
Temp.AutoTextEntries("QALetterheadTop").Insert Where:=Selection.Range
The error occurs on the second line.

Can anyone help me? I know autotext is handled differently in 2007, but I had hoped that I could use a single addin to handle all of it.

Thanks

lucas
02-18-2009, 09:53 AM
xem22, I don't have 2007 but the error seems to indicate that the file is not in the path shown.

It might also be necessary to save it as a version 2007 template file in that location and change the file extention in the code to match.

I'm just guessing at this point but I would check those things first. All based on it stopping on the second line of code as you have reported.

xeem22
02-18-2009, 09:57 AM
Thanks Lucas, I have checked and the file works properly in 2003, and comes up with the same error when I convert it to a 2007 template and reference that in the code instead.