Re: Automate a form textbox

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jean-Guy Marcil (no-spam_at_leaveme.alone)
Date: 11/26/04


Date: Fri, 26 Nov 2004 01:47:38 -0500

John Viall was telling us:
John Viall nous racontait que :

> Thanks, the top part of your reply worked, however the second part
> regarding opening an Excel spread*** gave me an error, on the first
> line.
>
> Just for troubleshooting, and to examine the code, I put it into a
> Subroutine called OpenExcel.
>
> It highlights the following:
> MyXL As Excel.Application
>
> And gives the error, User-defined type not defined.

Have you set a reference to the Excel Library?
In the VBA editor, Tools > References... > Check "Microsoft Excel..."

> While at it, is there a way to determine the path of the original Word
> Template, and use that to find the Work***?

You mean:

Dim MyPath as String
MyPath = ActiveDocument.AttachedTemplate.Path

?

-- 
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Quantcast