![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hello,
I am curious if there is a better way to differentiate when the form is in compose verses read state. The reason I am asking is, in previous versions of OLK the following code would adjust the size of the opening window to accomodate all the fields in the form as follows: Sub Item_Open() If Item.CreationTime = #1/1/4501# Then Set objInspector = Item.GetInspector objInspector.Left = 600 objInspector.Width = 640 objInspector.Top = 345 objInspector.Height = 535 Set objInspector = Nothing ElseIf Item.Size 0 Then Set objInspector = Item.GetInspector objInspector.Left = 650 objInspector.Width = 640 objInspector.Top = 230 objInspector.Height = 720 Set objInspector = Nothing End If End Sub Now (with OLK 2007) I get different results depending on whether the OS is Windows Vista or WinXP. Thanks in advance... -- Bill Billmire |
Ads |
#2
|
|||
|
|||
![]()
What results do you get on Vista and on XP?
I use Size = 0 and/or EntryID = "" to test for new items. That of course doesn't account for an existing item that is put into edit mode, but discerning whether or not a form is in compose mode has always been a hack in Outlook. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Bill Billmire" wrote in message ... Hello, I am curious if there is a better way to differentiate when the form is in compose verses read state. The reason I am asking is, in previous versions of OLK the following code would adjust the size of the opening window to accomodate all the fields in the form as follows: Sub Item_Open() If Item.CreationTime = #1/1/4501# Then Set objInspector = Item.GetInspector objInspector.Left = 600 objInspector.Width = 640 objInspector.Top = 345 objInspector.Height = 535 Set objInspector = Nothing ElseIf Item.Size 0 Then Set objInspector = Item.GetInspector objInspector.Left = 650 objInspector.Width = 640 objInspector.Top = 230 objInspector.Height = 720 Set objInspector = Nothing End If End Sub Now (with OLK 2007) I get different results depending on whether the OS is Windows Vista or WinXP. Thanks in advance... -- Bill Billmire |
#3
|
|||
|
|||
![]()
In Vista the (Item.CreationTime) returns the current date&time.
In WinXP it returns "#1/1/4501#" (without the double-quotes) only on the compose page. -- Bill Billmire "Ken Slovak - [MVP - Outlook]" wrote: What results do you get on Vista and on XP? I use Size = 0 and/or EntryID = "" to test for new items. That of course doesn't account for an existing item that is put into edit mode, but discerning whether or not a form is in compose mode has always been a hack in Outlook. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Bill Billmire" wrote in message ... Hello, I am curious if there is a better way to differentiate when the form is in compose verses read state. The reason I am asking is, in previous versions of OLK the following code would adjust the size of the opening window to accomodate all the fields in the form as follows: Sub Item_Open() If Item.CreationTime = #1/1/4501# Then Set objInspector = Item.GetInspector objInspector.Left = 600 objInspector.Width = 640 objInspector.Top = 345 objInspector.Height = 535 Set objInspector = Nothing ElseIf Item.Size 0 Then Set objInspector = Item.GetInspector objInspector.Left = 650 objInspector.Width = 640 objInspector.Top = 230 objInspector.Height = 720 Set objInspector = Nothing End If End Sub Now (with OLK 2007) I get different results depending on whether the OS is Windows Vista or WinXP. Thanks in advance... -- Bill Billmire |
#4
|
|||
|
|||
![]()
Hmm. I hadn't noticed that, I'll have to report it.
Checking with Outlook 2003 I see CreationTime as the current date on a brand new unsaved message, on WinXP. Checking in Outlook 2007 on WinXP I see CreationTime on a new unsaved message as 1/1/4501. So that's a behavior change from Outlook 2003. On Vista with Outlook 2007 I do see the current date for CreationTime. I used this line in the Outlook VBA Immediate window to check the CreationTime: ? Application.ActiveInspector.CurrentItem.CreationTi me Use Size or EntryID then to get an idea of whether the item is new or not. Size = 0 or EntryID = "" would do that. Those would give the same results as a null date for CreationTime. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Bill Billmire" wrote in message ... In Vista the (Item.CreationTime) returns the current date&time. In WinXP it returns "#1/1/4501#" (without the double-quotes) only on the compose page. -- Bill Billmire |
#5
|
|||
|
|||
![]()
I checked again with Vista with no addins enabled and now it shows
CreationTime as 1/1/4501. Are you using any addins or ECE's or BCM? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Ken Slovak - [MVP - Outlook]" wrote in message ... Hmm. I hadn't noticed that, I'll have to report it. Checking with Outlook 2003 I see CreationTime as the current date on a brand new unsaved message, on WinXP. Checking in Outlook 2007 on WinXP I see CreationTime on a new unsaved message as 1/1/4501. So that's a behavior change from Outlook 2003. On Vista with Outlook 2007 I do see the current date for CreationTime. I used this line in the Outlook VBA Immediate window to check the CreationTime: ? Application.ActiveInspector.CurrentItem.CreationTi me Use Size or EntryID then to get an idea of whether the item is new or not. Size = 0 or EntryID = "" would do that. Those would give the same results as a null date for CreationTime. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
read page to look like compose page | Steve Worcester | Outlook - Using Forms | 2 | December 13th 06 05:14 PM |
Command Button on Read Page | [email protected] | Outlook - Using Forms | 2 | October 18th 06 09:05 PM |
"Edit Compose Page" disabled | Dave S. | Outlook - Using Forms | 3 | October 5th 06 04:32 PM |
Edit Read Page | MeMatthew | Outlook - Using Forms | 14 | September 14th 06 01:13 PM |
Viewing the Read Page | Teelions | Outlook - Using Forms | 3 | January 30th 06 04:20 PM |