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 - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

"A rule in this public folder prevents a message this large from being posted."



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 11th 06, 01:39 AM posted to microsoft.public.outlook
karzi
external usenet poster
 
Posts: 1
Default "A rule in this public folder prevents a message this large from being posted."

I got an error from my VB program which tries to post a file to the
outlook public folder:

A rule in this public folder prevents a message this large from
being posted.

The machine that runs the VB program uses outlook2003. I can post the
same file with outlook2000 manually without problem. Does anyone know
why?

Dim objDocItem As Outlook.DocumentItem
Dim strFileType As String
Dim intLoc As Integer
Dim objAtt As Outlook.Attachment
' FileSystemObject requires reference to
' Microsoft Scripting Runtime library (scrrun.dll)
Dim fso As Scripting.FileSystemObject

On Error GoTo errorHandler

' check whether file exists
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(strFilePath) Then
' add new DocumentItem to folder
Set objDocItem = objFolder.Items.Add("IPM.Document")
' attach the file and set properties
Set objAtt = objDocItem.Attachments.Add(strFilePath)
objDocItem.Subject = objAtt.FileName

' set special message class for Office document files
intLoc = InStrRev(strFilePath, ".")
strFileType = Mid(strFilePath, intLoc + 1)
Select Case strFileType
Case "doc"
objDocItem.MessageClass =
"IPM.Document.Word.Document.8"
Case "xls"
objDocItem.MessageClass = "IPM.Document.Excel.Sheet.8"
Case "pps", "ppt"
objDocItem.MessageClass =
"IPM.Document.PowerPoint.Show.8"
End Select

objDocItem.Save
Call subError("Postfile", 1001, "Successfully posted " &
strFilePath, 1)
Call delay(20)
Else
Call subError("Postfile", 1001, "Could not find file: " &
strFilePath, 1)
End If
Exit Sub

errorHandler:
Set objDocItem = Nothing
Set fso = Nothing
Set objAtt = Nothing
Call subError("Postfile", Err.Number, Err.Description, 0)

Ads
  #2  
Old May 24th 06, 06:47 PM posted to microsoft.public.outlook
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default "A rule in this public folder prevents a message this large from being posted."

Does the folder have any restrictions as to what forms in can accept?

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

"karzi" wrote in message oups.com...
I got an error from my VB program which tries to post a file to the
outlook public folder:

A rule in this public folder prevents a message this large from
being posted.

The machine that runs the VB program uses outlook2003. I can post the
same file with outlook2000 manually without problem. Does anyone know
why?

Dim objDocItem As Outlook.DocumentItem
Dim strFileType As String
Dim intLoc As Integer
Dim objAtt As Outlook.Attachment
' FileSystemObject requires reference to
' Microsoft Scripting Runtime library (scrrun.dll)
Dim fso As Scripting.FileSystemObject

On Error GoTo errorHandler

' check whether file exists
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(strFilePath) Then
' add new DocumentItem to folder
Set objDocItem = objFolder.Items.Add("IPM.Document")
' attach the file and set properties
Set objAtt = objDocItem.Attachments.Add(strFilePath)
objDocItem.Subject = objAtt.FileName

' set special message class for Office document files
intLoc = InStrRev(strFilePath, ".")
strFileType = Mid(strFilePath, intLoc + 1)
Select Case strFileType
Case "doc"
objDocItem.MessageClass =
"IPM.Document.Word.Document.8"
Case "xls"
objDocItem.MessageClass = "IPM.Document.Excel.Sheet.8"
Case "pps", "ppt"
objDocItem.MessageClass =
"IPM.Document.PowerPoint.Show.8"
End Select

objDocItem.Save
Call subError("Postfile", 1001, "Successfully posted " &
strFilePath, 1)
Call delay(20)
Else
Call subError("Postfile", 1001, "Could not find file: " &
strFilePath, 1)
End If
Exit Sub

errorHandler:
Set objDocItem = Nothing
Set fso = Nothing
Set objAtt = Nothing
Call subError("Postfile", Err.Number, Err.Description, 0)

 




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
Public folder calender "overlay" onto personal calender Richard Edwards Outlook - General Queries 2 April 10th 06 02:13 PM
How to set up email from "X" to "Y" to go to a designated folder? Gordon Outlook - General Queries 2 April 7th 06 08:56 AM
How do I add "Calendar Name" FIELD in a public folder calendars. shelbyf9999 Outlook - Calandaring 0 April 6th 06 07:00 PM
Making contacts in public folder the default for "New Contacts"? Jarvster Outlook - Using Contacts 1 January 27th 06 03:53 PM
New meetings posted to Personal folders instead of "default" calan Ron Jon Outlook - Calandaring 9 January 19th 06 03:30 AM


All times are GMT +1. The time now is 01:53 AM.


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