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

Error message when saving a message



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old March 19th 08, 09:24 PM posted to microsoft.public.outlook.program_vba
HomeroOM
external usenet poster
 
Posts: 2
Default Error message when saving a message

Dear Eric

I've tried and it didn't work.

The message occurs, though, after the yes answer to a message box asking me
to save the message.

The A.Display worked OK.

The code I've posted is very simple and so is my intent.

Some things, for simplicity puposes only, I've ommited:

1. I invoke the code through an optin button in a User Form.
The code is:
-----------
Private Sub optEviaMsgAnexadas_Click()

modUtilitários.PrepararRemessaDeMensagens

End Sub
-----------
2. Although Outlook is installed in my PC, the PC is connected to a
microsoft network.

The macro I've used to show the form is:
----------
Public Sub PrepararEmails()

frmPreparaMensagens.Show vbModeless

End Sub
----------

The vbModeless constant was necessary because the display worked on my
debbuging session (inside VBA IDE) and issued the same message that Save is
issuing when I was invoking from a buttom on my Outlook toolbar.

Thanks for your super fast answer.

Keep up the good work

Homero




--
HomeroOM


"Eric Legault [MVP - Outlook]" wrote:

That is strange - it works fine for me. What version of Outlook?

The only thing I can think of doing is to fully qualify your variables when
you declare them (i.e. Dim A As Outlook.Application). Also try M.Display and
don't call save, and see if you can send or save it manually.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"HomeroOM" wrote:

I've created a simple piece of VBA code, intending to save a message
programmtically created.

The code follows:
----------------
Dim A As Application
Dim M As MailItem
Dim R As Recipient

Set A = Application

Set M = A.CreateItem(olMailItem)

M.Body = "this is a single message testing."

Set R = r")

R.Type = olOriginator

M.Subject = "Mensagens para arquivar"

Set R = ")

R.Type = olTo

M.Save

Set A = Nothing
Set M = Nothing
Set R = Nothing
--------------

On the 'M.Save' statement, i'm getting an error message (what you see bellow
is a free translation, because I'm using Outlook in Portuguese:
--------
It was not possible to end the operation. There are one or more invalid
parameter value.
--------

Can you help me to figure what's going on?

Thanks
--
HomeroOM

 




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
Error message when saving appointment if changing reminder [email protected] Outlook - Calandaring 0 February 15th 08 05:06 PM
Calendar: Error message - The form required to view this message Dave Kimani Outlook - Calandaring 0 July 18th 06 11:35 PM
Error message at saving Amir Marathonian Outlook - Calandaring 0 May 30th 06 08:53 PM
Error message when sending message in Outlook Vikes Outlook - General Queries 0 February 17th 06 10:02 PM
Error message when saving appointments syseng06 Outlook - Calandaring 0 January 10th 06 05:42 PM


All times are GMT +1. The time now is 03:36 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.