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

Get Public Folder Name - Automate PickFolder function



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 5th 06, 11:23 AM posted to microsoft.public.outlook.program_forms
FondaUK
external usenet poster
 
Posts: 3
Default Get Public Folder Name - Automate PickFolder function

Hi all,

I have an outlook custom form I have published to a Public Folder. A
new form is created from clicking a button within an MS Access database
and fields from the database are added to the custom form before
sending it.

The problem I have is referencing the public folder.

I can get the form to display with the correct data when referencing
the public folder using the code below.

Dim objOutlookApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem

Set objOutlookApp = New Outlook.Application
Set objNS = objOutlookApp.GetNamespace("MAPI")
'Set objFolder = objNS.GetDefaultFolder(olFolderDrafts)
Set objFolder = objNS.PickFolder
Set objItem = objFolder.Items.Add(g_strOutlookFormClass)

What I need is how to automatically reference the folder named

\\Public Folders\All Public Folders\Forms\Resource Forms

and create a new form based on the custom form with the data pulled in from
the database

Using the GetFolder function at
http://www.outlookcode.com/d/code/getfolder.htm

returns an error or empty string.

Cheers

Graham
  #2  
Old December 5th 06, 01:29 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Get Public Folder Name - Automate PickFolder function

Show how you're calling GetFolder.

--
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

"FondaUK" wrote in message ...
Hi all,

I have an outlook custom form I have published to a Public Folder. A
new form is created from clicking a button within an MS Access database
and fields from the database are added to the custom form before
sending it.

The problem I have is referencing the public folder.

I can get the form to display with the correct data when referencing
the public folder using the code below.

Dim objOutlookApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem

Set objOutlookApp = New Outlook.Application
Set objNS = objOutlookApp.GetNamespace("MAPI")
'Set objFolder = objNS.GetDefaultFolder(olFolderDrafts)
Set objFolder = objNS.PickFolder
Set objItem = objFolder.Items.Add(g_strOutlookFormClass)

What I need is how to automatically reference the folder named

\\Public Folders\All Public Folders\Forms\Resource Forms

and create a new form based on the custom form with the data pulled in from
the database

Using the GetFolder function at
http://www.outlookcode.com/d/code/getfolder.htm

returns an error or empty string.

Cheers

Graham

  #3  
Old December 7th 06, 02:58 PM posted to microsoft.public.outlook.program_forms
FondaUK
external usenet poster
 
Posts: 3
Default Get Public Folder Name - Automate PickFolder function

OK, so I have got it to work from MS Access using line below

Set objFolder =
objNS.GetDefaultFolder(olPublicFoldersAllPublicFol ders).Folders("Forms").Folders("Resource Forms")


Now, when the form is sent, all is ok. When the reply button is clicked,
just a blank email is shown. How do i do the above line in VBScript?




"Sue Mosher [MVP-Outlook]" wrote:

Show how you're calling GetFolder.

--
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

"FondaUK" wrote in message ...
Hi all,

I have an outlook custom form I have published to a Public Folder. A
new form is created from clicking a button within an MS Access database
and fields from the database are added to the custom form before
sending it.

The problem I have is referencing the public folder.

I can get the form to display with the correct data when referencing
the public folder using the code below.

Dim objOutlookApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem

Set objOutlookApp = New Outlook.Application
Set objNS = objOutlookApp.GetNamespace("MAPI")
'Set objFolder = objNS.GetDefaultFolder(olFolderDrafts)
Set objFolder = objNS.PickFolder
Set objItem = objFolder.Items.Add(g_strOutlookFormClass)

What I need is how to automatically reference the folder named

\\Public Folders\All Public Folders\Forms\Resource Forms

and create a new form based on the custom form with the data pulled in from
the database

Using the GetFolder function at
http://www.outlookcode.com/d/code/getfolder.htm

returns an error or empty string.

Cheers

Graham


  #4  
Old December 7th 06, 03:19 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Get Public Folder Name - Automate PickFolder function

Add a Const statement to assign a value to olPublicFoldersAllPublicFolders. VBScript knows nothing about Outlook constants.

What does the Reply button have to do with this scenario? A reply will show the form designated for the Reply action on the (Actions) page of a custom form. That cannot be a form published to a public folder.

--
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

"FondaUK" wrote in message ...
OK, so I have got it to work from MS Access using line below

Set objFolder =
objNS.GetDefaultFolder(olPublicFoldersAllPublicFol ders).Folders("Forms").Folders("Resource Forms")


Now, when the form is sent, all is ok. When the reply button is clicked,
just a blank email is shown. How do i do the above line in VBScript?

"Sue Mosher [MVP-Outlook]" wrote:

Show how you're calling GetFolder.

--
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

"FondaUK" wrote in message ...
Hi all,

I have an outlook custom form I have published to a Public Folder. A
new form is created from clicking a button within an MS Access database
and fields from the database are added to the custom form before
sending it.

The problem I have is referencing the public folder.

I can get the form to display with the correct data when referencing
the public folder using the code below.

Dim objOutlookApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem

Set objOutlookApp = New Outlook.Application
Set objNS = objOutlookApp.GetNamespace("MAPI")
'Set objFolder = objNS.GetDefaultFolder(olFolderDrafts)
Set objFolder = objNS.PickFolder
Set objItem = objFolder.Items.Add(g_strOutlookFormClass)

What I need is how to automatically reference the folder named

\\Public Folders\All Public Folders\Forms\Resource Forms

and create a new form based on the custom form with the data pulled in from
the database

Using the GetFolder function at
http://www.outlookcode.com/d/code/getfolder.htm

returns an error or empty string.

Cheers

Graham


  #5  
Old December 7th 06, 03:39 PM posted to microsoft.public.outlook.program_forms
FondaUK
external usenet poster
 
Posts: 3
Default Get Public Folder Name - Automate PickFolder function

The situation is that the form is created using data from a datbase. This is
sent to a particular person where they either approve or reject the data
shown. If the data is rejected, a certain set of questions is shown in the
custom form (previously hidden)asking for the reasons for rejection. Once
required fields have been completed, the form is then returned to the sender
and the database is automatically updated when the form reply is opened.

"Sue Mosher [MVP-Outlook]" wrote:

Add a Const statement to assign a value to olPublicFoldersAllPublicFolders. VBScript knows nothing about Outlook constants.

What does the Reply button have to do with this scenario? A reply will show the form designated for the Reply action on the (Actions) page of a custom form. That cannot be a form published to a public folder.

--
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

"FondaUK" wrote in message ...
OK, so I have got it to work from MS Access using line below

Set objFolder =
objNS.GetDefaultFolder(olPublicFoldersAllPublicFol ders).Folders("Forms").Folders("Resource Forms")


Now, when the form is sent, all is ok. When the reply button is clicked,
just a blank email is shown. How do i do the above line in VBScript?

"Sue Mosher [MVP-Outlook]" wrote:

Show how you're calling GetFolder.

--
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

"FondaUK" wrote in message ...
Hi all,

I have an outlook custom form I have published to a Public Folder. A
new form is created from clicking a button within an MS Access database
and fields from the database are added to the custom form before
sending it.

The problem I have is referencing the public folder.

I can get the form to display with the correct data when referencing
the public folder using the code below.

Dim objOutlookApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem

Set objOutlookApp = New Outlook.Application
Set objNS = objOutlookApp.GetNamespace("MAPI")
'Set objFolder = objNS.GetDefaultFolder(olFolderDrafts)
Set objFolder = objNS.PickFolder
Set objItem = objFolder.Items.Add(g_strOutlookFormClass)

What I need is how to automatically reference the folder named

\\Public Folders\All Public Folders\Forms\Resource Forms

and create a new form based on the custom form with the data pulled in from
the database

Using the GetFolder function at
http://www.outlookcode.com/d/code/getfolder.htm

returns an error or empty string.

Cheers

Graham


  #6  
Old December 7th 06, 04:30 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Get Public Folder Name - Automate PickFolder function

Again, if you want to show a custom form when the user clicks Reply, that form has to be published in the Organizational Forms library or in each user's Personal Forms library. Outlook doesn't know to go look for it in one among possibly thousands of public folders. Even the original form won't work unless it's in Org Forms or Personal Forms. The recipient won't be able to use the form design.

--
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

"FondaUK" wrote in message ...
The situation is that the form is created using data from a datbase. This is
sent to a particular person where they either approve or reject the data
shown. If the data is rejected, a certain set of questions is shown in the
custom form (previously hidden)asking for the reasons for rejection. Once
required fields have been completed, the form is then returned to the sender
and the database is automatically updated when the form reply is opened.

"Sue Mosher [MVP-Outlook]" wrote:

Add a Const statement to assign a value to olPublicFoldersAllPublicFolders. VBScript knows nothing about Outlook constants.

What does the Reply button have to do with this scenario? A reply will show the form designated for the Reply action on the (Actions) page of a custom form. That cannot be a form published to a public folder.

"FondaUK" wrote in message ...
OK, so I have got it to work from MS Access using line below

Set objFolder =
objNS.GetDefaultFolder(olPublicFoldersAllPublicFol ders).Folders("Forms").Folders("Resource Forms")


Now, when the form is sent, all is ok. When the reply button is clicked,
just a blank email is shown. How do i do the above line in VBScript?

"Sue Mosher [MVP-Outlook]" wrote:

Show how you're calling GetFolder.



"FondaUK" wrote in message ...
Hi all,

I have an outlook custom form I have published to a Public Folder. A
new form is created from clicking a button within an MS Access database
and fields from the database are added to the custom form before
sending it.

The problem I have is referencing the public folder.

I can get the form to display with the correct data when referencing
the public folder using the code below.

Dim objOutlookApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem

Set objOutlookApp = New Outlook.Application
Set objNS = objOutlookApp.GetNamespace("MAPI")
'Set objFolder = objNS.GetDefaultFolder(olFolderDrafts)
Set objFolder = objNS.PickFolder
Set objItem = objFolder.Items.Add(g_strOutlookFormClass)

What I need is how to automatically reference the folder named

\\Public Folders\All Public Folders\Forms\Resource Forms

and create a new form based on the custom form with the data pulled in from
the database

Using the GetFolder function at
http://www.outlookcode.com/d/code/getfolder.htm

returns an error or empty string.

Cheers

Graham


 




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
Copy email from local folder to public folder Andrew Outlook and VBA 0 November 16th 06 09:29 AM
"Find" function fails to work on public folder dvw Outlook - Using Contacts 0 October 23rd 06 11:24 PM
Obtaining Folder Size in Public Folder Favourites Kentucky Outlook and VBA 0 September 7th 06 04:14 PM
Automate Public Folder Creation John Mc Cabe Outlook and VBA 1 August 16th 06 04:01 PM
activate contact folder from public folder with "show this folder as email address book using a prf file Frankie K. Outlook - Using Contacts 7 July 25th 06 05:37 PM


All times are GMT +1. The time now is 05:32 AM.


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.