PC Review


Reply
Thread Tools Rate Thread

Can Outlook.Application be used to control open message windows?

 
 
Phil Hollingworth
Guest
Posts: n/a
 
      13th Dec 2004
Hi

We have a VFP 8 CRM application which - amongst other things - stores links
for any client to any document relating to them on our file server. When you
go into a client record you can see instantly if there are any documents on
file relating to them and it is straight forward to add a new file to a
record if we received something via email for instance.

The physical location of the file is not too important to our users as they
simply double click any file they want to view and the file is executed in
the shell object to open it's associated viewer.

The problem I am currently trying to solve is when a user wants to attach
one or more files relating to a client to an email. Currently they have to
manually create the email and more irritatingly they then have manually
navigate to all the files they want to attach.

What I would like to be code would be some way for the user to initially
create the email as usual and then, from the client record on the
application, select the files they want to send and click a button which
some how attaches the files from their various locations into the email the
user has created.

I thought an easy way to do this would be to access some kind of object
collection in the Outlook.Application model to provide the user with a list
of the open email windows and their subjects which should enable the user
which window / message they want their files attached to.

However I cannot find any way of accessing anything other than the main
outlook window.

Does anyone have any ideas how this could be achieved?

Thanks in advance!!

Phil H
(E-Mail Removed)





 
Reply With Quote
 
 
 
 
Stephanie Conroy [MSFT]
Guest
Posts: n/a
 
      20th Dec 2004
Phil, you can use the inspectors collection to do what you are asking. Here
is a simple subroutine that will list subjects for all open mail items.

Sub ListOpenMailItems()
Dim outapp As New Outlook.Application
Dim isps As Outlook.Inspectors
Dim isp As Outlook.Inspector

'get collection of currently open items
Set isps = outapp.Inspectors
For Each isp In isps
'check the class and only list mail items
If isp.CurrentItem.Class = OlObjectClass.olMail Then
Debug.Print isp.CurrentItem.Subject
End If
Next
End Sub


--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.



"Phil Hollingworth" <(E-Mail Removed)> wrote in message
news:41bd9fc1$0$16588$(E-Mail Removed)...
> Hi
>
> We have a VFP 8 CRM application which - amongst other things - stores
> links
> for any client to any document relating to them on our file server. When
> you
> go into a client record you can see instantly if there are any documents
> on
> file relating to them and it is straight forward to add a new file to a
> record if we received something via email for instance.
>
> The physical location of the file is not too important to our users as
> they
> simply double click any file they want to view and the file is executed in
> the shell object to open it's associated viewer.
>
> The problem I am currently trying to solve is when a user wants to attach
> one or more files relating to a client to an email. Currently they have to
> manually create the email and more irritatingly they then have manually
> navigate to all the files they want to attach.
>
> What I would like to be code would be some way for the user to initially
> create the email as usual and then, from the client record on the
> application, select the files they want to send and click a button which
> some how attaches the files from their various locations into the email
> the
> user has created.
>
> I thought an easy way to do this would be to access some kind of object
> collection in the Outlook.Application model to provide the user with a
> list
> of the open email windows and their subjects which should enable the user
> which window / message they want their files attached to.
>
> However I cannot find any way of accessing anything other than the main
> outlook window.
>
> Does anyone have any ideas how this could be achieved?
>
> Thanks in advance!!
>
> Phil H
> (E-Mail Removed)
>
>
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application unable to open Windows Mail message store Nikl Windows Vista Mail 2 21st Mar 2009 11:49 AM
outlook message HTML links try to open in windows explorer. Why? =?Utf-8?B?Q2xpdmU=?= Microsoft Outlook Installation 2 30th Sep 2006 01:35 PM
Windows Defender Message everytime I open a contact in Outlook =?Utf-8?B?YmVha3k=?= Spyware Application Compatibility 0 17th Mar 2006 05:30 PM
Suggestion: allow control-W to close Outlook message windows =?Utf-8?B?dGg3Nw==?= Microsoft Outlook Discussion 0 15th Aug 2005 10:35 PM
Can Outlook.Application be used to control open message windows? Phil Hollingworth Microsoft Outlook 1 20th Dec 2004 07:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:20 PM.