Is VBIDE.VBE available in Outlook 2000?

P

PastorMike

I'm trying to execute the following in Outlook 2000 VBA:

Sub ExportAllVBA()
Dim VBComp As VBIDE.VBComponent
Dim Sfx As String

For Each VBComp In VBE.VBProjects.VBComponents
Select Case VBComp.Type
Case vbext_ct_ClassModule, vbext_ct_Document
Sfx = ".cls"
Case vbext_ct_MSForm
Sfx = ".frm"
Case vbext_ct_StdModule
Sfx = ".bas"
Case Else
Sfx = ""
End Select
If Sfx <> "" Then
VBComp.Export _
Filename:="C:\" & VBComp.Name & Sfx
End If
Next VBComp

End Sub

A reference is set in the VBE to VBA Extensibility 5.3.
SP3 is installed (build 9.0.0.6627).

On execution, VBE is flagged as "Variable not defined".
What is wrong?
 
P

PastorMike

To the Moderators,
I was directed to managed newsgroups, of which I think this is one, by
my MSDN Universal subscription under the premise that posts would be answered
within 48 hours by someone knowledgeable.
I haven't yet seen a reply to this post.
Am I wording it incorrectly? Or posting where I shouldn't? Or asking
an unsuitable question?
I am in the dark. Could someone reply, please, and set me on the right
course?

Thanks,
Mike Gardner

p.s. Of course, this code snippet is lifted whole from Chip Pearson; did I
make a mistake in not giving attribution to him? Obviously, I didn't lay
claim to it. I'm just trying to autoexport my Outlook solution with a single
click.
 
M

Michael Herzfeld

Hi Mike. Sorry no one replied to you sooner. Unfortunately, Outlook
doesn't expose the VBE object anywhere in its object model, so there
isn't any way I'm aware of to programmatically manipulate the VB
project.

Michael Herzfeld
Office Programmability Test Team


-----Original Message-----
From: PastorMike [mailto:p[email protected]]
Posted At: Wednesday, August 17, 2005 1:26 PM
Posted To: microsoft.public.office.developer.vba
Conversation: Is VBIDE.VBE available in Outlook 2000?
Subject: RE: Is VBIDE.VBE available in Outlook 2000?

To the Moderators,
I was directed to managed newsgroups, of which I think this is one,
by
my MSDN Universal subscription under the premise that posts would be
answered
within 48 hours by someone knowledgeable.
I haven't yet seen a reply to this post.
Am I wording it incorrectly? Or posting where I shouldn't? Or
asking
an unsuitable question?
I am in the dark. Could someone reply, please, and set me on the
right
course?

Thanks,
Mike Gardner

p.s. Of course, this code snippet is lifted whole from Chip Pearson; did
I
make a mistake in not giving attribution to him? Obviously, I didn't
lay
claim to it. I'm just trying to autoexport my Outlook solution with a
single
click.
 
P

PastorMike

Mike,
Thanks for the reply. The reason, it appears, that my question went
unanswered was because of some issue with not having configured an anonymous
email alias.
I did eventually hear from Sue Mosher in the other newsgroup to which I
posted this question, and she agrees that the Outlook VBE doesn't support
this (its own!) object.
It surprised me that Outlook allowed me to get as far as I did, setting
a reference to VBAExt5.3 and declaring a VBE object, only to reject it all at
compile time.

Michael Herzfeld said:
Hi Mike. Sorry no one replied to you sooner. Unfortunately, Outlook
doesn't expose the VBE object anywhere in its object model, so there
isn't any way I'm aware of to programmatically manipulate the VB
project.

Michael Herzfeld
Office Programmability Test Team


-----Original Message-----
From: PastorMike [mailto:p[email protected]]
Posted At: Wednesday, August 17, 2005 1:26 PM
Posted To: microsoft.public.office.developer.vba
Conversation: Is VBIDE.VBE available in Outlook 2000?
Subject: RE: Is VBIDE.VBE available in Outlook 2000?

To the Moderators,
I was directed to managed newsgroups, of which I think this is one,
by
my MSDN Universal subscription under the premise that posts would be
answered
within 48 hours by someone knowledgeable.
I haven't yet seen a reply to this post.
Am I wording it incorrectly? Or posting where I shouldn't? Or
asking
an unsuitable question?
I am in the dark. Could someone reply, please, and set me on the
right
course?

Thanks,
Mike Gardner

p.s. Of course, this code snippet is lifted whole from Chip Pearson; did
I
make a mistake in not giving attribution to him? Obviously, I didn't
lay
claim to it. I'm just trying to autoexport my Outlook solution with a
single
click.


PastorMike said:
I'm trying to execute the following in Outlook 2000 VBA:

Sub ExportAllVBA()
Dim VBComp As VBIDE.VBComponent
Dim Sfx As String

For Each VBComp In VBE.VBProjects.VBComponents
Select Case VBComp.Type
Case vbext_ct_ClassModule, vbext_ct_Document
Sfx = ".cls"
Case vbext_ct_MSForm
Sfx = ".frm"
Case vbext_ct_StdModule
Sfx = ".bas"
Case Else
Sfx = ""
End Select
If Sfx <> "" Then
VBComp.Export _
Filename:="C:\" & VBComp.Name & Sfx
End If
Next VBComp

End Sub

A reference is set in the VBE to VBA Extensibility 5.3.
SP3 is installed (build 9.0.0.6627).

On execution, VBE is flagged as "Variable not defined".
What is wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top