N
Nick Jardine
Hello,
I am writing a Word 2003 add-in that is supposed to detect when a user
activates an Autotext "shortcut", and convert the resulting phrase to a
hyperlink. I was unable to find a way to be directly notified of a user
activating an auto-text completion, and came up with a work-around involving
inserting the auto text with a blank URL (eg http://blank), and combining it
with a thread that wakes up every frew seconds parsing the document for the
blank URLs and fills them in with the dynamicly generated details that we
need.
From the thread I can read data from word fine (specifically, the Address of
the hyperlink), but cannot modify that data without getting a memory access
violation that crashes word (this is NOT a _com_error exception not being
caught - it is an actual memory access violation within word itself).
Is there any trick necessary to be able to safely access the Word object
model from a user thread, or is it just flat-out not possible?
Alternately, is there any way to have word send an event to an add-in when
the user creates a hyperlink or triggers an Autotext completion?
Any help would be appreciated.
Regards,
Nick Jardine
I am writing a Word 2003 add-in that is supposed to detect when a user
activates an Autotext "shortcut", and convert the resulting phrase to a
hyperlink. I was unable to find a way to be directly notified of a user
activating an auto-text completion, and came up with a work-around involving
inserting the auto text with a blank URL (eg http://blank), and combining it
with a thread that wakes up every frew seconds parsing the document for the
blank URLs and fills them in with the dynamicly generated details that we
need.
From the thread I can read data from word fine (specifically, the Address of
the hyperlink), but cannot modify that data without getting a memory access
violation that crashes word (this is NOT a _com_error exception not being
caught - it is an actual memory access violation within word itself).
Is there any trick necessary to be able to safely access the Word object
model from a user thread, or is it just flat-out not possible?
Alternately, is there any way to have word send an event to an add-in when
the user creates a hyperlink or triggers an Autotext completion?
Any help would be appreciated.
Regards,
Nick Jardine