A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

script to create a folder in "INBOX"



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 1st 07, 03:16 PM posted to microsoft.public.outlook.program_forms
Amin
external usenet poster
 
Posts: 10
Default script to create a folder in "INBOX"

Dear Expert,

would you please take a little time and give me some guide or an answer if
the following issue is possible in Outlook or not, thanks in any way. I think
with your background, you are the one that can tell me if the research I'm
buzy with is possible or not. I have to automate the following action in
Outlook;

"Under user mailbox in MS-Outlook create a New folder and call it Archives -
Select the new folder and choose for Properties – click introduction page and
check and activate the option show introduction page for this folder and fill
in the URL(http://guard-en/UserSrchCriteria.php) and click ok.

So far I've been able to create the following script that creates the folder

-------------------------------------------

'Option Explicit
On Error Resume Next
'This script creates an Outlook folder called NorthSeas Archive under the
Inbox folder

Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
Set myNewFolder = myInboxFolder.Folders.Add("NorthSeas Archive")

---------------------------------------------

Could you please tell me if I can add those option((choose for Properties –
click introduction page and check and activate the option show introduction
page for this folder and fill in the
URL(http://guard-en/UserSrchCriteria.php) and click ok.)) in my script? if
so, is it possible that you give me some hints or perhaps for you is just a
matter of second to add those commands

Thanks very much indeed!


--
Amin Bahari
IT Consultant
The Netherlands
Ads
  #2  
Old April 1st 07, 08:19 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default script to create a folder in "INBOX"

By "introduction page," do you mean a folder home page? If so, then set the folder's WebViewOn and WebViewURL properties.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Amin" wrote in message ...
Dear Expert,

would you please take a little time and give me some guide or an answer if
the following issue is possible in Outlook or not, thanks in any way. I think
with your background, you are the one that can tell me if the research I'm
buzy with is possible or not. I have to automate the following action in
Outlook;

"Under user mailbox in MS-Outlook create a New folder and call it Archives -
Select the new folder and choose for Properties – click introduction page and
check and activate the option show introduction page for this folder and fill
in the URL(http://guard-en/UserSrchCriteria.php) and click ok.

So far I've been able to create the following script that creates the folder

-------------------------------------------

'Option Explicit
On Error Resume Next
'This script creates an Outlook folder called NorthSeas Archive under the
Inbox folder

Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
Set myNewFolder = myInboxFolder.Folders.Add("NorthSeas Archive")

---------------------------------------------

Could you please tell me if I can add those option((choose for Properties –
click introduction page and check and activate the option show introduction
page for this folder and fill in the
URL(http://guard-en/UserSrchCriteria.php) and click ok.)) in my script? if
so, is it possible that you give me some hints or perhaps for you is just a
matter of second to add those commands


  #3  
Old April 2nd 07, 11:56 PM posted to microsoft.public.outlook.program_forms
Amin
external usenet poster
 
Posts: 10
Default script to create a folder in "INBOX"

I'm sorry it's the Dutch translation, it's home page as you said. After I've
got your hint I've changed as you see but it still doesn't work. Do you see
what I don't?
----------
Sub northseasArchief()
Dim outApp As New Outlook.Application
Dim nsp As Outlook.NameSpace
Dim mpfInbox As Outlook.MAPIFolder
Dim mpfNew As Outlook.MAPIFolder

Set nsp = outApp.GetNamespace("MAPI")
Set mpfInbox = nsp.GetDefaultFolder(olFolderInbox)
Set mpfNew = mpfInbox.Folders.Add("Archief")
mpfNew.WebViewURL = "http://guard-en/UserSrchCriteria.php"
mpfNew.WebViewOn = True
End Sub
--
Amin Bahari
IT Consultant
The Netherlands


"Sue Mosher [MVP-Outlook]" wrote:

By "introduction page," do you mean a folder home page? If so, then set the folder's WebViewOn and WebViewURL properties.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Amin" wrote in message ...
Dear Expert,

would you please take a little time and give me some guide or an answer if
the following issue is possible in Outlook or not, thanks in any way. I think
with your background, you are the one that can tell me if the research I'm
buzy with is possible or not. I have to automate the following action in
Outlook;

"Under user mailbox in MS-Outlook create a New folder and call it Archives -
Select the new folder and choose for Properties – click introduction page and
check and activate the option show introduction page for this folder and fill
in the URL(http://guard-en/UserSrchCriteria.php) and click ok.

So far I've been able to create the following script that creates the folder

-------------------------------------------

'Option Explicit
On Error Resume Next
'This script creates an Outlook folder called NorthSeas Archive under the
Inbox folder

Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
Set myNewFolder = myInboxFolder.Folders.Add("NorthSeas Archive")

---------------------------------------------

Could you please tell me if I can add those option((choose for Properties –
click introduction page and check and activate the option show introduction
page for this folder and fill in the
URL(http://guard-en/UserSrchCriteria.php) and click ok.)) in my script? if
so, is it possible that you give me some hints or perhaps for you is just a
matter of second to add those commands



  #4  
Old April 3rd 07, 01:44 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default script to create a folder in "INBOX"

Sometimes it's necessary to navigate away from the current folder, e.g.:

Set outApp.ActiveExplorer.CurrentFolder = mpfInbox
Set outApp.ActiveExplorer.CurrentFolder = mpfNew

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Amin" wrote in message news
I'm sorry it's the Dutch translation, it's home page as you said. After I've
got your hint I've changed as you see but it still doesn't work. Do you see
what I don't?
----------
Sub northseasArchief()
Dim outApp As New Outlook.Application
Dim nsp As Outlook.NameSpace
Dim mpfInbox As Outlook.MAPIFolder
Dim mpfNew As Outlook.MAPIFolder

Set nsp = outApp.GetNamespace("MAPI")
Set mpfInbox = nsp.GetDefaultFolder(olFolderInbox)
Set mpfNew = mpfInbox.Folders.Add("Archief")
mpfNew.WebViewURL = "http://guard-en/UserSrchCriteria.php"
mpfNew.WebViewOn = True
End Sub
--
Amin Bahari
IT Consultant
The Netherlands


"Sue Mosher [MVP-Outlook]" wrote:

By "introduction page," do you mean a folder home page? If so, then set the folder's WebViewOn and WebViewURL properties.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Amin" wrote in message ...
Dear Expert,

would you please take a little time and give me some guide or an answer if
the following issue is possible in Outlook or not, thanks in any way. I think
with your background, you are the one that can tell me if the research I'm
buzy with is possible or not. I have to automate the following action in
Outlook;

"Under user mailbox in MS-Outlook create a New folder and call it Archives -
Select the new folder and choose for Properties – click introduction page and
check and activate the option show introduction page for this folder and fill
in the URL(http://guard-en/UserSrchCriteria.php) and click ok.

So far I've been able to create the following script that creates the folder

-------------------------------------------

'Option Explicit
On Error Resume Next
'This script creates an Outlook folder called NorthSeas Archive under the
Inbox folder

Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
Set myNewFolder = myInboxFolder.Folders.Add("NorthSeas Archive")

---------------------------------------------

Could you please tell me if I can add those option((choose for Properties –
click introduction page and check and activate the option show introduction
page for this folder and fill in the
URL(http://guard-en/UserSrchCriteria.php) and click ok.)) in my script? if
so, is it possible that you give me some hints or perhaps for you is just a
matter of second to add those commands



  #5  
Old April 6th 07, 10:40 AM posted to microsoft.public.outlook.program_forms
Amin
external usenet poster
 
Posts: 10
Default script to create a folder in "INBOX"

I don't understand why the following script doesn't report any error and
create the folder under Inbox but no sign of the home page in properties! I'm
going nuts!. Please is there any body that can help me in this?

Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
Set myNewFolder = myInboxFolder.Folders.Add("Archief")
Set outApp.ActiveExplorer.CurrentFolder = mpfInbox
Set outApp.ActiveExplorer.CurrentFolder = mpfNew
Set mpfNew = mpfInbox.Folders.Add("Archief")
mpfNew.WebViewURL = "http://guard-en/UserSrchCriteria.php"
mpfNew.WebViewOn = True
--
Amin Bahari
IT Consultant
The Netherlands


"Sue Mosher [MVP-Outlook]" wrote:

Sometimes it's necessary to navigate away from the current folder, e.g.:

Set outApp.ActiveExplorer.CurrentFolder = mpfInbox
Set outApp.ActiveExplorer.CurrentFolder = mpfNew

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Amin" wrote in message news
I'm sorry it's the Dutch translation, it's home page as you said. After I've
got your hint I've changed as you see but it still doesn't work. Do you see
what I don't?
----------
Sub northseasArchief()
Dim outApp As New Outlook.Application
Dim nsp As Outlook.NameSpace
Dim mpfInbox As Outlook.MAPIFolder
Dim mpfNew As Outlook.MAPIFolder

Set nsp = outApp.GetNamespace("MAPI")
Set mpfInbox = nsp.GetDefaultFolder(olFolderInbox)
Set mpfNew = mpfInbox.Folders.Add("Archief")
mpfNew.WebViewURL = "http://guard-en/UserSrchCriteria.php"
mpfNew.WebViewOn = True
End Sub
--
Amin Bahari
IT Consultant
The Netherlands


"Sue Mosher [MVP-Outlook]" wrote:

By "introduction page," do you mean a folder home page? If so, then set the folder's WebViewOn and WebViewURL properties.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Amin" wrote in message ...
Dear Expert,

would you please take a little time and give me some guide or an answer if
the following issue is possible in Outlook or not, thanks in any way. I think
with your background, you are the one that can tell me if the research I'm
buzy with is possible or not. I have to automate the following action in
Outlook;

"Under user mailbox in MS-Outlook create a New folder and call it Archives -
Select the new folder and choose for Properties – click introduction page and
check and activate the option show introduction page for this folder and fill
in the URL(http://guard-en/UserSrchCriteria.php) and click ok.

So far I've been able to create the following script that creates the folder

-------------------------------------------

'Option Explicit
On Error Resume Next
'This script creates an Outlook folder called NorthSeas Archive under the
Inbox folder

Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
Set myNewFolder = myInboxFolder.Folders.Add("NorthSeas Archive")

---------------------------------------------

Could you please tell me if I can add those option((choose for Properties –
click introduction page and check and activate the option show introduction
page for this folder and fill in the
URL(http://guard-en/UserSrchCriteria.php) and click ok.)) in my script? if
so, is it possible that you give me some hints or perhaps for you is just a
matter of second to add those commands



  #6  
Old April 6th 07, 01:26 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default script to create a folder in "INBOX"

Maybe the script isn't running at all? A MsgBox statement will tell you. Only published forms will run code.

Or maybe you have an On Error Resume Next statement blocking the error that these statements would raise:

Set outApp.ActiveExplorer.CurrentFolder = mpfInbox
Set mpfNew = mpfInbox.Folders.Add("Archief")

I would strongly suggest that you add an Option Explicit statement to the declarations section of your script and then add Dim statements to each procedure to declare your variables before using them. Part of your problem is that your code uses variables that haven't been instantiated and uses more than one variable for the same object.

Also, if you're trying to navigate away from a folder and back again as part of setting up folder home page, that needs to happen *after* the FHP settings are applied, not before.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Amin" wrote in message ...
I don't understand why the following script doesn't report any error and
create the folder under Inbox but no sign of the home page in properties! I'm
going nuts!. Please is there any body that can help me in this?

Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
Set myNewFolder = myInboxFolder.Folders.Add("Archief")
Set outApp.ActiveExplorer.CurrentFolder = mpfInbox
Set outApp.ActiveExplorer.CurrentFolder = mpfNew
Set mpfNew = mpfInbox.Folders.Add("Archief")
mpfNew.WebViewURL = "http://guard-en/UserSrchCriteria.php"
mpfNew.WebViewOn = True
--
Amin Bahari
IT Consultant
The Netherlands


"Sue Mosher [MVP-Outlook]" wrote:

Sometimes it's necessary to navigate away from the current folder, e.g.:

Set outApp.ActiveExplorer.CurrentFolder = mpfInbox
Set outApp.ActiveExplorer.CurrentFolder = mpfNew



"Amin" wrote in message news
I'm sorry it's the Dutch translation, it's home page as you said. After I've
got your hint I've changed as you see but it still doesn't work. Do you see
what I don't?
----------
Sub northseasArchief()
Dim outApp As New Outlook.Application
Dim nsp As Outlook.NameSpace
Dim mpfInbox As Outlook.MAPIFolder
Dim mpfNew As Outlook.MAPIFolder

Set nsp = outApp.GetNamespace("MAPI")
Set mpfInbox = nsp.GetDefaultFolder(olFolderInbox)
Set mpfNew = mpfInbox.Folders.Add("Archief")
mpfNew.WebViewURL = "http://guard-en/UserSrchCriteria.php"
mpfNew.WebViewOn = True
End Sub


"Sue Mosher [MVP-Outlook]" wrote:

By "introduction page," do you mean a folder home page? If so, then set the folder's WebViewOn and WebViewURL properties.

"Amin" wrote in message ...
Dear Expert,

would you please take a little time and give me some guide or an answer if
the following issue is possible in Outlook or not, thanks in any way. I think
with your background, you are the one that can tell me if the research I'm
buzy with is possible or not. I have to automate the following action in
Outlook;

"Under user mailbox in MS-Outlook create a New folder and call it Archives -
Select the new folder and choose for Properties – click introduction page and
check and activate the option show introduction page for this folder and fill
in the URL(http://guard-en/UserSrchCriteria.php) and click ok.

So far I've been able to create the following script that creates the folder

-------------------------------------------

'Option Explicit
On Error Resume Next
'This script creates an Outlook folder called NorthSeas Archive under the
Inbox folder

Set objOutlook = CreateObject("Outlook.Application")
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myInboxFolder = myNameSpace.GetDefaultFolder(6)
Set myNewFolder = myInboxFolder.Folders.Add("NorthSeas Archive")

---------------------------------------------

Could you please tell me if I can add those option((choose for Properties –
click introduction page and check and activate the option show introduction
page for this folder and fill in the
URL(http://guard-en/UserSrchCriteria.php) and click ok.)) in my script? if
so, is it possible that you give me some hints or perhaps for you is just a
matter of second to add those commands


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
script to make a folder in "INBOX" Amin Outlook and VBA 1 April 2nd 07 06:03 AM
Outlook 2000 a semicolon after the "Inbox" folder Chik Outlook - General Queries 5 April 18th 06 01:33 PM
Replace "INBOX" with "CALENDAR" so mail not visible upon opening Buddy's Mom Outlook - Installation 1 April 7th 06 12:03 PM
Outlook 2003\Exchange 2000 - "Unable to display the folder" in inbox TedStyle Outlook - Installation 0 March 13th 06 07:35 PM


All times are GMT +1. The time now is 07:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.