LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Controling 1 Office program from aother

I just want an email received date placed in an excel cell.
Below are the things I have tried.

Dim wbXL As Excel.Application

Set wbXL = Excel.Application
‘the above line works and goes through

Set wbXL = Excel.Application.Workbooks("G:\Print pdf files3.xls")
‘the above line does not work and returns Script out of range error

Set wbXL = workbooks("G:\Print pdf files3.xls")
‘the above line does not work and returns Script out of range error

For Each objMailItem In objPersonalInbox.Items

MsgBox objMailItem.Subject & " " & objMailItem.ReceivedTime
‘the above line works and returns subject and received time

wbXL.workbooks("G:\Print pdf files3.xls").sheets("Sheet1").[g2] = "PP"
‘the above line does not work and returns Script out of range error


wbXL.workbooks("G:\Print pdf files3.xls").sheets("Sheet1").[g2] =
objMailItem.ReceivedTime
‘the above line does not work and returns Script out of range error
Next

I don’t care if I need to use a variable to do this with and then
dump the value in to excel
But I can’t get that to work either.
Can any one help?
Any help would be appreciated.

Thank You genelm


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to insert a copied row into all aother tabbed table Greg Excel Discussion (Misc queries) 1 June 4th 10 10:22 PM
eula pops up every time i open an office program. office 2003 ins. ijscholl Excel Discussion (Misc queries) 0 July 28th 09 11:54 PM
How can I get Office to activate a command in a non Office program Terry T. Excel Discussion (Misc queries) 1 December 16th 06 06:19 AM
dynamic table_array lookup in aother workbooks Salman Excel Discussion (Misc queries) 1 November 20th 06 07:45 AM
How do I set the default e-mail program for MS Office XP? Andy Setting up and Configuration of Excel 1 March 19th 06 09:07 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"