how to get custom form and send custom form from VB 
Author Message
 how to get custom form and send custom form from VB

i made a custom form and saved it in Organizational Forms
Library, for example with name : foAdi

and then i wanna make a VB application that get this
custom form and send it to someone else...
the question is how i can get this custom form and how to
tell outlook.application to send this custom form...
i try manually with Outlook 2000, however when someone
else receives this custom form..all the buttons i added on
the form dissapear....

Sample code :
    Dim mOApp As Outlook.Application
    Dim mONs As Outlook.NameSpace
    Dim mOMailItem As Outlook.MailItem

    Set mOApp = New Outlook.Application
    Set mONs = mOApp.GetNamespace("MAPI")
    Set mOMailItem = mOApp.CreateItem(olMailItem)
    With mOMailItem
        .To = GetSetting("Send2Email", "VERP", "email")
        .Subject = "Nylon Production Condition Approval"
        .Body = ?
        If .Recipients.ResolveAll Then
            .Send
        End If
    End With



Tue, 15 Jun 2004 19:20:46 GMT  
 how to get custom form and send custom form from VB
The custom form must be installed and published on the recipient
system for that to work, and the item must have been sent using RTF
format. The recipient also must be using Outlook.

To launch a custom form you would use the form's published custom
message class:
    Set mOMailItem = mOApp.CreateItem("IPM.Note.foAdi")

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Quote:
> i made a custom form and saved it in Organizational Forms
> Library, for example with name : foAdi

> and then i wanna make a VB application that get this
> custom form and send it to someone else...
> the question is how i can get this custom form and how to
> tell outlook.application to send this custom form...
> i try manually with Outlook 2000, however when someone
> else receives this custom form..all the buttons i added on
> the form dissapear....

> Sample code :
>     Dim mOApp As Outlook.Application
>     Dim mONs As Outlook.NameSpace
>     Dim mOMailItem As Outlook.MailItem

>     Set mOApp = New Outlook.Application
>     Set mONs = mOApp.GetNamespace("MAPI")
>     Set mOMailItem = mOApp.CreateItem(olMailItem)
>     With mOMailItem
>         .To = GetSetting("Send2Email", "VERP", "email")
>         .Subject = "Nylon Production Condition Approval"
>         .Body = ?
>         If .Recipients.ResolveAll Then
>             .Send
>         End If
>     End With



Tue, 15 Jun 2004 23:34:21 GMT  
 how to get custom form and send custom form from VB
dear friend,

i do this code following your instruction :
however it returns run-time error '13' type mismatch on executing
'Set mOMailItem = mOApp.CreateItem("IPM.Note.foAdi")'
i read that createitem only supports OlItemType like this :
'CreateItem(ItemType As OlItemType) as Object'

    Dim mOApp As Outlook.Application
    Dim mONs As Outlook.NameSpace
    Dim mOMailItem As Object (or Dim mOMailItem as MailItem)

    Set mOApp = New Outlook.Application
    Set mONs = mOApp.GetNamespace("MAPI")
    Set mOMailItem = mOApp.CreateItem("IPM.Note.foAdi")
    With mOMailItem
        .To = GetSetting("Send2Email", "VERP", "email")
        .Subject = "Nylon Production Condition Approval"
        .Body = "Text"
        If .Recipients.ResolveAll Then
            .Send
        End If
    End With

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Fri, 18 Jun 2004 11:10:09 GMT  
 how to get custom form and send custom form from VB
You must use the MAPIFolder.Items.Add method to create an item using a
custom form. See http://www.slipstick.com/dev/launchform.htm

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com


Quote:
> dear friend,

> i do this code following your instruction :
> however it returns run-time error '13' type mismatch on executing
> 'Set mOMailItem = mOApp.CreateItem("IPM.Note.foAdi")'
> i read that createitem only supports OlItemType like this :
> 'CreateItem(ItemType As OlItemType) as Object'

>     Dim mOApp As Outlook.Application
>     Dim mONs As Outlook.NameSpace
>     Dim mOMailItem As Object (or Dim mOMailItem as MailItem)

>     Set mOApp = New Outlook.Application
>     Set mONs = mOApp.GetNamespace("MAPI")
>     Set mOMailItem = mOApp.CreateItem("IPM.Note.foAdi")
>     With mOMailItem
>         .To = GetSetting("Send2Email", "VERP", "email")
>         .Subject = "Nylon Production Condition Approval"
>         .Body = "Text"
>         If .Recipients.ResolveAll Then
>             .Send
>         End If
>     End With

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Fri, 18 Jun 2004 22:43:32 GMT  
 how to get custom form and send custom form from VB
dear friend,

yes, you're right...
however when the email message is received by the receiver..
the email message turns to be standard email form not foAdi..
i read help file :
.

1. Right-click the Inbox folder and click Properties.
2. Change the When posting to this folder, use setting
to the name of the post form that was just published.
(foAdi in Organizational Forms Library)
3. Click OK
.
it returns 'you can not create an item of this type in this folder'.
and i also think that it is not flexible...everytime user wants to
receive some custom emails , he has to first change the default form for
'Inbox folder' whereas...the custom forms may vary perhaps more than
1...

thanks.

this is sample code:
====================
    Dim objFolder As Outlook.MAPIFolder
    Dim objItem As Object

    Set objFolder = Application.ActiveExplorer.CurrentFolder
    Set objItem = objFolder.Items.Add("IPM.Note.foAdi")

    With objItem
        .To = GetSetting("Send2Email", "VERP", "email")
        .Subject = "Nylon Production Condition Approval"
        .Body = "Hi"
        If .Recipients.ResolveAll Then
            .Send
        End If
    End With

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 20 Jun 2004 10:34:50 GMT  
 how to get custom form and send custom form from VB
Are you sending the message to a recipient who (a) has Outlook, (b) is
marked to receive rich-text messages, and (c) has access to the form design?
See http://www.slipstick.com/dev/sendform.htm

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com


Quote:
> however when the email message is received by the receiver..
> the email message turns to be standard email form not foAdi..



Sun, 20 Jun 2004 21:30:21 GMT  
 how to get custom form and send custom form from VB
My mistake in typing too fast. You would have to use
    Items.Add("IPM.Note.foAdi")
on the items collection for the folder you want and have that form
published.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Quote:
> dear friend,

> i do this code following your instruction :
> however it returns run-time error '13' type mismatch on executing
> 'Set mOMailItem = mOApp.CreateItem("IPM.Note.foAdi")'
> i read that createitem only supports OlItemType like this :
> 'CreateItem(ItemType As OlItemType) as Object'

>     Dim mOApp As Outlook.Application
>     Dim mONs As Outlook.NameSpace
>     Dim mOMailItem As Object (or Dim mOMailItem as MailItem)

>     Set mOApp = New Outlook.Application
>     Set mONs = mOApp.GetNamespace("MAPI")
>     Set mOMailItem = mOApp.CreateItem("IPM.Note.foAdi")
>     With mOMailItem
>         .To = GetSetting("Send2Email", "VERP", "email")
>         .Subject = "Nylon Production Condition Approval"
>         .Body = "Text"
>         If .Recipients.ResolveAll Then
>             .Send
>         End If
>     End With

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sun, 20 Jun 2004 22:30:19 GMT  
 how to get custom form and send custom form from VB
dear friend,

thanks for your reply.

(a) i tested this email on my own email address and my outlook 2000 (To
and From are my email addresses). yes..

(b) yes..
On the Tools menu, i click Options, and
then click the Mail Format tab.
In the Send in this message format list,
i click Microsoft Outlook Rich Text.

(c) i am not sure...because i already published it in
organizational forms library and save it...

Options - Other tab -
General (Advanced Options) -
Custom Forms - Manage Forms -
i move foAdi from Organization Forms
to Personal Forms
...

frankly speaking, i do not know about (c) please correct me if my (c)
action is incomplete ..

(d) i wonder about the following statement -->
If you are sending through a Microsoft Exchange Server Internet Mail
Connector, the connector must be configured to support Transport Neutral
Encapsulation Format (TNEF), which encapsulates the rich text.
..
then i do the following steps :
New - Choose Form - foAdi
(from Organizational Forms Library)
there are two buttons on foAdi...
then i send it to my own email address..
i received it on my outlook 2000,
but i can not see the buttons on this foAdi.
then i right-click Inbox folder, then
click General Tab then change 'When posting
to this folder use : foAdi..'
but it returns error you can not create an
item of this type in this folder.

thanx

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 21 Jun 2004 10:34:17 GMT  
 how to get custom form and send custom form from VB

sorry for being careless and not mindful on senses..
actually if i were more mindful on outlook custom form design mode
before..
i would notice that there are two modes :
edit compose page and edit read page.

i only set the buttons on edit compose page.
and forget to set the buttons on edit read page.

thanx

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 21 Jun 2004 11:02:16 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Sending Custom Forms With VB

2. custom form control: Cannot view design view of forms that inherit this form

3. Recurring-event Custom Meeting Forms Don't save custom fields

4. Setting values to Custom Fields on Custom Forms

5. Custom Property changes in Custom Outlook Form

6. Custom Field Value Lists on Custom Forms

7. Custom Fields in Custom Forms

8. getting custom task form fields

9. Custom form getting one-offed

10. Custom Form Checkbox send to Word

11. Removing VBScript on Custom Form after sent

12. Send Mail using Outlook Custom Form

 

 
Powered by phpBB® Forum Software