Start with sheet number 2

  • Thread starter Lars Thomsen Nielsen
  • Start date
L

Lars Thomsen Nielsen

Outlook2000. I have made an additional sheet called "Hotel" on my
appointment form. How can I make this sheet be the one that
"starts up". I have tried something like the code shown below,
but it does (naturally) not work.

Best regards

Lars

**************

Function Item_Open()

If Item.size = 0 then

Dim objPage

Set objPage = Item.GetInspector.ModifiedFormPages("Hotel")

objPage.Display

End Function
 
S

Sue Mosher [MVP]

When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. The method you're looking for is Inspector.SetCurrentFormPage:

Set obInsp = Item.GetInspector
objInsp.SetCurrentFormPage "Hotel"
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
L

Lars Thomsen Nielsen

Sue said:
When in doubt, check the object browser: Press ALt+F11 to open the
VBA environment in Outlook, then press F2. The method you're looking
for is Inspector.SetCurrentFormPage:

Thanks Sue! I was not aware that I could actually use the help in
VBA, but offcourse, I'll try that in the future (I'm pretty new
to VBScript). By the way, the code below was just what I needed.
Set obInsp = Item.GetInspector
objInsp.SetCurrentFormPage "Hotel"

Lars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top