My syntax is this:

VBE.ActiveVBProject.VBComponents(1).Export filename

Why am I getting this error?

Re: Run-time error '50029'; Method 'Export' of object 'VBComponent' fa by Jonathan

Jonathan
Fri Aug 03 08:29:48 CDT 2007


"jaslegume" <jaslegume@discussions.microsoft.com> wrote in message
news:8EB9402D-9103-4C2A-81E0-31153D276C41@microsoft.com...
> My syntax is this:
>
> VBE.ActiveVBProject.VBComponents(1).Export filename
>
> Why am I getting this error?

Various possibilities.

1. "filename" doesn't include a valid file name

2. Your security settings (Tools Macro, Security), do not trust access to
the Visual Basic project

3. The VBA project in the template is locked for viewing.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup