BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VBA to Delphi

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
AZ
Guest





PostPosted: Wed Jun 25, 2003 2:51 pm    Post subject: VBA to Delphi Reply with quote



Hi,

What is the equivalent of:
Windows("Document2").Activate
in Delphi?
I tried with Windows.Item("Document2").Activate, where 'Document2' is of
type OleVariant but an exception is raising. I want to be able to switch
between documents (run time open) at run time.

regards


Back to top
Dmitry Streblechenko
Guest





PostPosted: Wed Jun 25, 2003 5:19 pm    Post subject: Re: VBA to Delphi Reply with quote



Did you try
Windows.Item['Document2'].Activate

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"AZ" <xtcsuk (AT) yahoo (DOT) co.uk> wrote

Quote:
Hi,

What is the equivalent of:
Windows("Document2").Activate
in Delphi?
I tried with Windows.Item("Document2").Activate, where 'Document2' is of
type OleVariant but an exception is raising. I want to be able to switch
between documents (run time open) at run time.

regards





Back to top
AZ
Guest





PostPosted: Wed Jun 25, 2003 5:49 pm    Post subject: Re: VBA to Delphi Reply with quote



Yes, I did, it would come up with error something like 'object not in the
collection'.
regards

"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote

Quote:
Did you try
Windows.Item['Document2'].Activate

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"AZ" <xtcsuk (AT) yahoo (DOT) co.uk> wrote in message
news:3ef9b6ba (AT) newsgroups (DOT) borland.com...
Hi,

What is the equivalent of:
Windows("Document2").Activate
in Delphi?
I tried with Windows.Item("Document2").Activate, where 'Document2' is of
type OleVariant but an exception is raising. I want to be able to
switch
between documents (run time open) at run time.

regards







Back to top
Dmitry Streblechenko
Guest





PostPosted: Wed Jun 25, 2003 7:25 pm    Post subject: Re: VBA to Delphi Reply with quote

Can you pass an integer index (say, 1) instead of 'Document2'?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"AZ" <xtcsuk (AT) yahoo (DOT) co.uk> wrote

Quote:
Yes, I did, it would come up with error something like 'object not in the
collection'.
regards

"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:3ef9d9b9$1 (AT) newsgroups (DOT) borland.com...
Did you try
Windows.Item['Document2'].Activate

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"AZ" <xtcsuk (AT) yahoo (DOT) co.uk> wrote in message
news:3ef9b6ba (AT) newsgroups (DOT) borland.com...
Hi,

What is the equivalent of:
Windows("Document2").Activate
in Delphi?
I tried with Windows.Item("Document2").Activate, where 'Document2' is
of
type OleVariant but an exception is raising. I want to be able to
switch
between documents (run time open) at run time.

regards









Back to top
AZ
Guest





PostPosted: Thu Jun 26, 2003 7:07 am    Post subject: Re: VBA to Delphi Reply with quote

Yes, but still an error. I can see the way VBA does it by recording a macro
in Word, you can pass either the name of the document or the index.

regards

"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote

Quote:
Can you pass an integer index (say, 1) instead of 'Document2'?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"AZ" <xtcsuk (AT) yahoo (DOT) co.uk> wrote in message
news:3ef9e082 (AT) newsgroups (DOT) borland.com...
Yes, I did, it would come up with error something like 'object not in
the
collection'.
regards

"Dmitry Streblechenko" <dmitry (AT) dimastr (DOT) com> wrote in message
news:3ef9d9b9$1 (AT) newsgroups (DOT) borland.com...
Did you try
Windows.Item['Document2'].Activate

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"AZ" <xtcsuk (AT) yahoo (DOT) co.uk> wrote in message
news:3ef9b6ba (AT) newsgroups (DOT) borland.com...
Hi,

What is the equivalent of:
Windows("Document2").Activate
in Delphi?
I tried with Windows.Item("Document2").Activate, where 'Document2'
is
of
type OleVariant but an exception is raising. I want to be able to
switch
between documents (run time open) at run time.

regards











Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.