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

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
phil@wrltd.co.uk





0
phil8826 (2)
12/13/2004 1:57:45 PM
outlook 87535 articles. 10 followers. Follow

1 Replies
295 Views

Similar Articles

[PageSpeed] 15

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" <phil@wrltd.co.uk> wrote in message 
news:41bd9fc1$0$16588$cc9e4d1f@news-text.dial.pipex.com...
> 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
> phil@wrltd.co.uk
>
>
>
>
> 


0
stefcon (1)
12/20/2004 7:36:15 PM
Reply:

Similar Artilces:

Can't see 401(k) contribiltion total
I've set up a 401(k)accont. I transfer contribiltions to this 401(k)account from each paycheck. When I go to the 401 (k) account view, it shows all the informations such as transections and the account vallue ect., EXCEPT the total contribiltion. I want to know not only what my 401(k) vallue is, but how much money I have contribilt total or over a period of time as well. I find no place to see it. Anybody can help? I'm using Money2002 and 2004 Trial Verstion. Thanks a lot! ...

How can I print a selection in Outlook 2003?
How can I print just a selection of an email in Outlook 2003? The printer driver window is different from the one that comes up in Outlook Express. Thank you! You can do this for HTML formatted messages. Highlight your text, File-> Print... and select to print only the selection -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Murphie" <Murphie@discussions.microsoft.com> wrote in message news:92F39B50-B877-408A-AAA7-DF350B1D72ED@microsoft.com....

outlook express
Anyone know if there is anyway to recover emails, folders, contacts, etc... if you re-installed a new copy of xp over 2000 but didn't use the upgrade feature. That is to say, all of my 2000 OE doesn't appear when I open OE in the newly installed XP environment. Does the old info get stored in some file I can link to xp oe? This newsgroup is for support of Outlook 97, 98, 2000 & 2002 from the Office family for Windows PCs. For Outlook Express (OE) support try posting in one of these newsgroups: microsoft.public.inetexplorer.ie4.outlookexpress for OE 4.x microsoft.public.wi...

How to tell if a form is open
I want to know how to return a value telling me whether or not a form is currently open. Something like this pseudo-code: If Forms![new appointment].Open = True Then 'send harry a box of chocolates' End If Cheers -- Nick Assuming Access 2000 or later: If CurrentProject.AllForms("new appointment").IsLoaded Then -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Nick Heath" <NickHeath@discussions.microsoft.com> wrote in messa...

error: OBE-15502 Can only have 16000 per document
Hi, I tried to export data from oracle query builder to Excel sheet, got a error message: OBE-15502 Can only have 16000 per document Is there any way i can get more records(over 16000 or unlimited) in one sheet? thanks. -- JJ ...

Can different editions of Publisher be used together?
If my son uses Publisher 2003 on a school computer, downloads his work to a flash drive, brings it home to edit on Publisher 2007, will he then be able to take the edited work back to the school computer to be used, or will it not be compatible? Stateparent wrote: > If my son uses Publisher 2003 on a school computer, downloads his work to a > flash drive, brings it home to edit on Publisher 2007, will he then be able > to take the edited work back to the school computer to be used, or will it > not be compatible? Publisher 2003 and 2007 share a common file format, so the sc...

Sending/exporting Outlook Contacts for use in another computer
I want to send the Outlook Contacts address book from my desktop to use in my laptop. Can it be as simple as copying the whole address book file and replacing the laptop Contacts address book with the new one? Thanks. Bob There is no separate "address book" file. The file you need is your Personal Folders file (*.pst) It's where all the mail, calendar, contacts etc are stored. Take a look at these pages for info on Outlook data backup or transfer: http://www.slipstick.com/config/backup.htm http://www.howto-outlook.com/Howto/backupandrestore.htm http://office.microsoft.com...

controls showing up late with ShowWindow?
I have an application I wrote to print some labels to a barcode printer. It works fine, but I noticed that two labels which I hide at design time and then show just prior to printing with WriteFile, act a bit strange. Only one shows up initially and then after printing the other one shows up. I got around this by putting them in the printing loop which loops through all the files though I did not really want to do it that way. Even when I do it this way though the one label loses its sunken property until printing is completed. Any ideas why and how I can fix this. For the time ...

Make table truncates text concatenated using fnConcatenate
I have a MakeTable query which uses the fnConcatenate( ) function to merge a bunch of information into a single field. Unfortunately, the field length exceeds 255 characters and the MakeTable tries to dump this into a text field, rather than identifying that the field should be a memo field. I know I could create the base table and import the data from my query into that table, but I would prefer to make this table on the fly, and then delete it when I am done with it. Any recommendations? -- Email address is not valid. Please reply to newsgroup only. On Wed, 11 Apr 2007 12:48:04 -07...

Can't send/receive
anyone have a situation where all of sudden they can't send new messages or receive anything? I get a message when I click on "accounts" that says 'fatal error in outlook unable to complete operation" ...

Can not Customize Leads View
Hi I have tried to customize the Leads view, I tried to add a view and add some columns to it. The view is shown however I see only the name column. When I go back to the View customization, I see the columns I added. Published your customizations??? -- ---------------------- regards, Ilya Milshtein MBS Master, MBSCP, MCP Softline International www.softline.ru "alsap" wrote: > Hi I have tried to customize the Leads view, I tried to add a view and add > some columns to it. > The view is shown however I see only the name column. > When I go back to the View customi...

Can I change the "Applied Task Update Requests and Errors" view?
I really like this view in PWA 2007, but I would like to replace one column with another. Is this view customizeable? Randy -- Bad news, my friend. This view is not customizable, nor is the view shown in the Task Updates customizable (which many users wish it was). Hope this help. -- Dale A. Howard [MVP] VP of Educational Services msProjectExperts http://www.msprojectexperts.com http://www.projectserverexperts.com "We write the books on Project Server" "Randy Schmid" <RandySchmid@discussions.microsoft.com> wrote in message news:72FA34B5-...

repetitive windows update
Despite my Outlook 2007 is correctly installed and working, from several days I am receiving KB980376 security update, that is unable to install as "unable to find the related product". Any idea on how to stop this bothering routine ? I tryed to install manually with Windows XP Pro safe install : no result! Thanks Manlio ...

Should be an easy but I can not figure it out!!
I have a text box where the user enters a date and it is assigned to variable txtDate. How to I convert that to the serial number of the date? Thanks for the help IIRC, you can use DATEVAL(String) to get the serial date. -- HTH, Barb Reinhardt "VinceW" wrote: > I have a text box where the user enters a date and it is assigned to variable > txtDate. How to I convert that to the serial number of the date? > > Thanks for the help Barb, Thanks for the quick reply, however I get the error "Sub or Function not defined" when trying...

Controlling how user posts a blog
Is it possible to control how items are posted on to a blog? The blog owner would like the readers to be able to respond to his posts but he doesn't want readers to create a new thread. thanks in advance ...

Bulk attachments
I have a very long list of Images in a single folder that I want to attach to seperate fields in a table/form. Each record contains two images, which are named like this: W:\Foldername\Micromap Run 001 A.bmp =(1st record) W:\Foldername\Micromap Run 001 B.bmp =(1st record) W:\Foldername\Micromap Run 002 A.bmp =(2nd record) W:\Foldername\Micromap Run 002 B.bmp =(2nd record) W:\Foldername\Micromap Run 003 A.bmp =(3rd record) W:\Foldername\Micromap Run 003 B.bmp =(3rd record) and so on... Image A goes to field A Image B goes to field B Is there a way of doing this au...

Outlook Today #43
How do I change the font on the Outlook Today screen? And where do I find OT - it doesn't appear in my navigation pane (only appears when I first start Outlook) -- The greatest of faults is to be conscious of none. ....Thomas Carlyle Steve <hgd@wsx.inv> wrote: > How do I change the font on the Outlook Today screen? http://support.microsoft.com/kb/236081/en-us > And where do I > find OT - it doesn't appear in my navigation pane (only appears when I > first start Outlook) Click the root of your data store (the one with the "Outlook Today" icon of t...

audible click when opening a new window.
I know I should be able to find this somewhere but I can't seem to figure it out. When I open a new folder or window there is a "click" sound that the computer makes. How can I turn this off? Thanks! Amadeus Try: Control Panel-Sounds "Start Navigation" and "Complete Navigation" are the relevant items. ....Alan -- Alan Edwards, MS MVP Windows -Internet Explorer http://dts-l.com/index.htm On Sun, 13 Jun 2010 13:56:27 -0700, in microsoft.public.windowsxp.basics, Amadeus <Amadeus@discussions.microsoft.com> wrote: >I kno...

outlook error...Operation Failed
I have been using outlook for many years and in the last week I am not able to open outlook. It appears it is going to open up and then at the last second and error message comes up "Operation Failed." I have removed and reinstalled outlook and I can't get past this error message? Anybody know how I can correct this? Scott How about posting some details about your Outlook version and setup? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account w...

Publisher file won't open #2
I worked for three hours then Publsher crashed. I had saved my file, but when I trie to open it it says problem with file, do you want to report it, and then reboots Publisher. How can I save my work? Using Publisher 2003. You may send the file to me. If I can open it I'll save it for you. If it crashes my system, you may be SOL. (Surely out of luck.) If you want to accept my offer, send it to jl dot paules at gmail at com. -- JoAnn Paules MVP Microsoft [Publisher] "Don Smith" <dhsmith@bellsouth.net> wrote in message news:r4ns615gkmkm12q5or5nd0k70gac5stjbc@4ax....

can't uninstall exchange from cluster nodes
hi our client has several exchange clusters, and one of them is being retired. we have removed the exchange resources and the EVS and the server no longer appears in the organization and everything else there seems to be ok. we can't seem to uninstall exchange from either of the nodes. setup will start saying it's loading components then terminates with no error; happens on both nodes. both nodes are exchange 2003 sp1 on windows 2003. i did find the setup log; here is what it says, hope someone can shed some light on this (company info replaced with < >): [19:47:23] *...

Can't delete email #2
I'm am trying to help a friend who is using Outlook Express on W98, I cannot delete any messages from her in box. She has over 500 in there, which may be part of the problem. Any suggestions? Desperate! Mark Mark Ryan <m.ryan@earthlink.com> wrote: > I'm am trying to help a friend who is using Outlook Express > on W98, I cannot delete any messages from her in box. She > has over 500 in there, which may be part of the problem. > Any suggestions? The first suggestion is to ask in an Outlok Express newsgroup. The second suggestion is to delete Deleted Items.dbx and ...

Selection button not in Outlook 2003
I would like to print a "selection" of a larger article from the internet, (just as I did in the past using Outlook Express)however there is no button in the FILE/PRINT/ menu Please help? It only works on HTML formatted messages. On 21 Apr 2004 21:11, =?Utf-8?B?SG93ZWV5?= <anonymous@discussions.microsoft.com> wrote: >I would like to print a "selection" of a larger article from the internet, >(just as I did in the past using Outlook Express)however there is no button >in the FILE/PRINT/ menu.Please help? > -- Diane Poremsky [MVP - Outlook] Author, Te...

Need to import contacts from Outlook to Outlook Express
I have a freind having trouble with email on the road and she needs to start using Outlook Express rather than Outlook. How do you import Contacts from OUtlook into Outlook Express. Thanks in advance Hi Donnie, please search the *.wab file on your computer after that FILE | IMPORT | Adressbook -- Ich habe nichts gemacht, gestern gings noch! Bitte in den Newsgroup antworten damit jeder etwas davon hat. Bravestar@Datenschutzministerium.de "Donnie" <ymivey@hotmail.com> schrieb im Newsbeitrag news:uR0#ZZBcEHA.2352@TK2MSFTNGP09.phx.gbl... > I have a freind having trouble w...

Can Not Reply To Emails
Running Windows 7 Professional with latest version of WLM. I get email messages I can not reply to. The reply button is grayed out. For now I am forwarding them to my WinXP computer and then replying from that computer with OE6. Anybody have any ideas? -- <Bill> Brought to you from Anchorage, Alaska. The most obvious reason for not having an active Reply button is not having a mail account set up. --=20 Gary VanderMolen, Microsoft MVP (Mail) http://mvp.support.microsoft.com/default.aspx/profile/vandermolen "Bill Bradshaw" <bradshaw@gci.net>...