Discussion:
outlook linking using VB6 on Vista and Office 2007
(too old to reply)
The Mechanic
2007-05-01 11:46:02 UTC
Permalink
Has anyone else had a problem linking to outlook from within the IDE, I have
code like
Set oLapp = Nothing
Set oLapp = GetObject(, "Outlook.Application")
which works fine in the compiled program but when using the ide under vista
business together with office 2007 it hangs for a while and comes up with a
'Switch to' message

I am running the IDE in XP compatability mode and 'Run as Administrator'
Does anyone have a work around?
Jan Hyde (VB MVP)
2007-05-01 12:28:08 UTC
Permalink
The Mechanic <***@discussions.microsoft.com>'s wild
thoughts were released on Tue, 1 May 2007 04:46:02 -0700
Post by The Mechanic
Has anyone else had a problem linking to outlook from within the IDE, I have
code like
Set oLapp = Nothing
Set oLapp = GetObject(, "Outlook.Application")
which works fine in the compiled program but when using the ide under vista
business together with office 2007 it hangs for a while and comes up with a
'Switch to' message
I am running the IDE in XP compatability mode and 'Run as Administrator'
Does anyone have a work around?
Actually I've had that problem on and off for quite some
time, long before Vista or Office 2007.
The Mechanic
2007-05-01 12:37:03 UTC
Permalink
ok, thats strange, it worked fine when I had Win2003 and Office 2003 as my
desktop I was able to debug at will which is why I was querying it, I guess
moving back to that environment would be a solution but I was wanting to test
other things with Vista and Office 2007
Post by Jan Hyde (VB MVP)
thoughts were released on Tue, 1 May 2007 04:46:02 -0700
Post by The Mechanic
Has anyone else had a problem linking to outlook from within the IDE, I have
code like
Set oLapp = Nothing
Set oLapp = GetObject(, "Outlook.Application")
which works fine in the compiled program but when using the ide under vista
business together with office 2007 it hangs for a while and comes up with a
'Switch to' message
I am running the IDE in XP compatability mode and 'Run as Administrator'
Does anyone have a work around?
Actually I've had that problem on and off for quite some
time, long before Vista or Office 2007.
Jan Hyde (VB MVP)
2007-05-01 13:40:27 UTC
Permalink
The Mechanic <***@discussions.microsoft.com>'s wild
thoughts were released on Tue, 1 May 2007 05:37:03 -0700
Post by The Mechanic
ok, thats strange, it worked fine when I had Win2003 and Office 2003 as my
desktop I was able to debug at will which is why I was querying it, I guess
moving back to that environment would be a solution but I was wanting to test
other things with Vista and Office 2007
Oh, there is one thing that it could be. Back in XP (I
think) there was a change to the OS to prevent windows from
stealing the focus, this also affected windows you *wanted*
to steal focus from your app such as outlook.

This seems to happend a lot more in Vista.

J
Post by The Mechanic
Post by Jan Hyde (VB MVP)
thoughts were released on Tue, 1 May 2007 04:46:02 -0700
Post by The Mechanic
Has anyone else had a problem linking to outlook from within the IDE, I have
code like
Set oLapp = Nothing
Set oLapp = GetObject(, "Outlook.Application")
which works fine in the compiled program but when using the ide under vista
business together with office 2007 it hangs for a while and comes up with a
'Switch to' message
I am running the IDE in XP compatability mode and 'Run as Administrator'
Does anyone have a work around?
Actually I've had that problem on and off for quite some
time, long before Vista or Office 2007.
Jan Hyde (VB MVP)
2007-05-01 13:41:55 UTC
Permalink
The Mechanic <***@discussions.microsoft.com>'s wild
thoughts were released on Tue, 1 May 2007 04:46:02 -0700
Post by The Mechanic
Has anyone else had a problem linking to outlook from within the IDE, I have
code like
Set oLapp = Nothing
Set oLapp = GetObject(, "Outlook.Application")
which works fine in the compiled program but when using the ide under vista
business together with office 2007 it hangs for a while and comes up with a
'Switch to' message
I am running the IDE in XP compatability mode and 'Run as Administrator'
Does anyone have a work around?
And just one more final though - hardly anyone posts to this
group anymore and so you won't get many replies either. I'd
suggest posting to microsoft.public.vb.general rather than
here.
Jan Hyde (VB MVP)
2007-05-01 13:42:46 UTC
Permalink
"Jan Hyde (VB MVP)" <***@REMOVE.ME.uboot.com>'s
wild thoughts were released on Tue, 01 May 2007 14:41:55
Post by Jan Hyde (VB MVP)
thoughts were released on Tue, 1 May 2007 04:46:02 -0700
Post by The Mechanic
Has anyone else had a problem linking to outlook from within the IDE, I have
code like
Set oLapp = Nothing
Set oLapp = GetObject(, "Outlook.Application")
which works fine in the compiled program but when using the ide under vista
business together with office 2007 it hangs for a while and comes up with a
'Switch to' message
I am running the IDE in XP compatability mode and 'Run as Administrator'
Does anyone have a work around?
And just one more final though - hardly anyone posts to this
group anymore and so you won't get many replies either. I'd
suggest posting to microsoft.public.vb.general rather than
here.
Darn it. I meant microsoft.public.vb.general.discussion.
The Mechanic
2007-05-01 16:17:03 UTC
Permalink
Thanks for the posting tip Jan, I haven't used the newsgroups before so I
wasn't sure where to go, I have found a work around though and it is entirely
daft but it seems to work

In the Control panel "Internet Options" find Windows Mail and set this to be
the default email package (I also set up an email account in windows mail-not
my normal address) and then say no to outlook when it asks whether it should
be the default

I can now run my program in the IDE and it works Ok and loads the outlook
form and sends emails

and NO, I don't believe it either, I only tried windows mail thinking i
could use that for testing instead! in the same way I used to use express
Post by Jan Hyde (VB MVP)
wild thoughts were released on Tue, 01 May 2007 14:41:55
Post by Jan Hyde (VB MVP)
thoughts were released on Tue, 1 May 2007 04:46:02 -0700
Post by The Mechanic
Has anyone else had a problem linking to outlook from within the IDE, I have
code like
Set oLapp = Nothing
Set oLapp = GetObject(, "Outlook.Application")
which works fine in the compiled program but when using the ide under vista
business together with office 2007 it hangs for a while and comes up with a
'Switch to' message
I am running the IDE in XP compatability mode and 'Run as Administrator'
Does anyone have a work around?
And just one more final though - hardly anyone posts to this
group anymore and so you won't get many replies either. I'd
suggest posting to microsoft.public.vb.general rather than
here.
Darn it. I meant microsoft.public.vb.general.discussion.
Loading...