Accessing controls on Compose Page vs Read Page 
Author Message
 Accessing controls on Compose Page vs Read Page

I am using a modified version of the form for the IPM.Note message class and
this form has two varieties, the one for composing new messages and the one
for reading messages that have already been sent (either to me or by me). I
have added controls to both the Compose Page (Message) and Read Page
(Message) and have included some VBScript code (within the sub Item_Open) to
address both controls. The problem is that Outlook doesn't recognize the
controls on the Compose Page if I read an exisiting message and, vice versa,
doesn't recognize the controls on the Read Page when I compose a new
message. Any ideas what code I include to make sure the controls on both
"Message Pages" are recognized by the VBScript code?
Thanks,
Graham


Mon, 09 Feb 2004 06:01:32 GMT  
 Accessing controls on Compose Page vs Read Page
Use code in your Item_Open event handler to tell which layout you're working
with:

Function Item_Open()
    If Item.Size = 0 Then
        ' it's a new item -- Compose
    Else
        ' Read
    End If
End Function

--

Sue Mosher, Outlook MVP
Author of
     Teach Yourself Microsoft Outlook 2000 Programming in 24 Hours
     Microsoft Outlook 2000 E-mail and Fax Guide
Outlook and Exchange solutions at http://www.slipstick.com


Quote:
> I am using a modified version of the form for the IPM.Note message class
and
> this form has two varieties, the one for composing new messages and the
one
> for reading messages that have already been sent (either to me or by me).
I
> have added controls to both the Compose Page (Message) and Read Page
> (Message) and have included some VBScript code (within the sub Item_Open)
to
> address both controls. The problem is that Outlook doesn't recognize the
> controls on the Compose Page if I read an exisiting message and, vice
versa,
> doesn't recognize the controls on the Read Page when I compose a new
> message. Any ideas what code I include to make sure the controls on both
> "Message Pages" are recognized by the VBScript code?
> Thanks,
> Graham



Mon, 09 Feb 2004 06:17:56 GMT  
 Accessing controls on Compose Page vs Read Page
I got a great sugestion for this to test if the size of the message is zero.
This works well, except for when I forward a message. Then the size is
greater than zero, but I want to access the controls on the compose page.
Any other suggestions?
Graham

Quote:
> I am using a modified version of the form for the IPM.Note message class
and
> this form has two varieties, the one for composing new messages and the
one
> for reading messages that have already been sent (either to me or by me).
I
> have added controls to both the Compose Page (Message) and Read Page
> (Message) and have included some VBScript code (within the sub Item_Open)
to
> address both controls. The problem is that Outlook doesn't recognize the
> controls on the Compose Page if I read an exisiting message and, vice
versa,
> doesn't recognize the controls on the Read Page when I compose a new
> message. Any ideas what code I include to make sure the controls on both
> "Message Pages" are recognized by the VBScript code?
> Thanks,
> Graham



Wed, 03 Mar 2004 14:33:28 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Accessing controls on Read vs Compose problem

2. Active page vs. Visual page

3. International Issues - Locale Code Page Vs. VB Code Page

4. Distinguishing between Edit/Compose pages in code.

5. Page size for the background= Page size of the first page of the drawing

6. VB vs Data Access pages

7. Page Footer on Page 1 Refers to Page 2

8. Page n of Total pages (or Max Pages function)

9. How to call script in HMTL page, from ActiveX control embedded in same page

10. Problem manipulating MonthView control with Page Up and Page Down keys

11. How to Hide the Default Property Page for an ActiveX Control in Front Page

12. Accessing the Read Page of a form

 

 
Powered by phpBB® Forum Software