PC Review


Reply
Thread Tools Rate Thread

Re: Outlook Read Email does not run my custom form (still)

 
 
Mike
Guest
Posts: n/a
 
      4th Jun 2005
I found out where in my code the form is being "one offed" such that the
button is not working. When I try and insert text into my custom fields it
is being one offed. This is the code I'm using (visual foxpro):

loForm = .GetInspector.ModifiedFormPages("Message")
loDD = loForm.Controls("CaseCategory")
loDD.Value = m.tcCatUse

The third line is what is causing my form to one-off. Any idea why or what
I can do about it?

Thanks,
Mike

"Mike" <(E-Mail Removed)> wrote in message
news:ENGdnaKESqTfeT3fRVn-(E-Mail Removed)...
> Hello - I have a custom Email form in Outlook I have designed with a
> button
> on it (with script code). I have published the form. I have unchecked
> the
> "send form definition with item" at the property sheet.
>
> When I click my custom button on the form it works great when I send an
> Email to myself (as a test) in Outlook. But, when I send the Email from
> my
> application it does not work. I'm thinking there is something wrong with
> the code in my application and how it is launching the form. If I click
> Form, Run this form then the custom button works either way (whether I
> send
> the form directly from outlook or from my application). I am using this
> code (Visual FoxPro Code):
>
> loNameSpace = loApp.GetNameSpace("MAPI")
> loOutbox = loNameSpace.GetDefaultFolder(4)
> loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
> loMsg.Display
>
> Do I need to change my code? I can't figure out why when I send it
> through
> Outlook everything works but when I send it through my application it
> doesn't. I'm thinking my code is not accessing the published forms in
> Outlook. I don't know Outlook programming very well so all help would be
> appreciated. Thanks.
>
>
> Mike
>
>
>
>



 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      4th Jun 2005
Why are you setting a control value instead of the value of the property bound to that control? What is m? In any case, setting control values is not a known one-off cause. I bet it's something else.

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


"Mike" <(E-Mail Removed)> wrote in message news:j9qdnUYwYbR4dj3fRVn-(E-Mail Removed)...
>I found out where in my code the form is being "one offed" such that the
> button is not working. When I try and insert text into my custom fields it
> is being one offed. This is the code I'm using (visual foxpro):
>
> loForm = .GetInspector.ModifiedFormPages("Message")
> loDD = loForm.Controls("CaseCategory")
> loDD.Value = m.tcCatUse
>
> The third line is what is causing my form to one-off. Any idea why or what
> I can do about it?
>
> Thanks,
> Mike
>
> "Mike" <(E-Mail Removed)> wrote in message
> news:ENGdnaKESqTfeT3fRVn-(E-Mail Removed)...
>> Hello - I have a custom Email form in Outlook I have designed with a
>> button
>> on it (with script code). I have published the form. I have unchecked
>> the
>> "send form definition with item" at the property sheet.
>>
>> When I click my custom button on the form it works great when I send an
>> Email to myself (as a test) in Outlook. But, when I send the Email from
>> my
>> application it does not work. I'm thinking there is something wrong with
>> the code in my application and how it is launching the form. If I click
>> Form, Run this form then the custom button works either way (whether I
>> send
>> the form directly from outlook or from my application). I am using this
>> code (Visual FoxPro Code):
>>
>> loNameSpace = loApp.GetNameSpace("MAPI")
>> loOutbox = loNameSpace.GetDefaultFolder(4)
>> loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
>> loMsg.Display
>>
>> Do I need to change my code? I can't figure out why when I send it
>> through
>> Outlook everything works but when I send it through my application it
>> doesn't. I'm thinking my code is not accessing the published forms in
>> Outlook. I don't know Outlook programming very well so all help would be
>> appreciated. Thanks.
>>
>>
>> Mike
>>
>>
>>
>>

>
>

 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      4th Jun 2005
Hi Sue - I have narrowed it down even further. I have found that if I use:

.UserProperties.Find("CaseCategory").Value = "TESTING"

then everything works and the form is not "one-offed" But, it is a dropdown
so I would like to populate the dropdown box. If I do it this way:

loForm = .GetInspector.ModifiedFormPages("Message")
loDD = loForm.Controls("CaseCategory")
loDD.PossibleValues = m.tcCatAll
loDD.Value = "Test"

the form is again "one offed" So it has something to do with setting
PossibleValues or even Values that is oneoffing the form. Lines 1 and 2
above in the code do not oneoff the form but lines 3 and 4 oneoff the form.
Is there another way to set the PossibleValues without using a GetInspector
or something else I can do? I have tested this with breakpoints and I know
the code above oneoffs the form.

Thanks,
Mike

"Sue Mosher [MVP-Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Why are you setting a control value instead of the value of the property
bound to that control? What is m? In any case, setting control values is not
a known one-off cause. I bet it's something else.

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


"Mike" <(E-Mail Removed)> wrote in message
news:j9qdnUYwYbR4dj3fRVn-(E-Mail Removed)...
>I found out where in my code the form is being "one offed" such that the
> button is not working. When I try and insert text into my custom fields
> it
> is being one offed. This is the code I'm using (visual foxpro):
>
> loForm = .GetInspector.ModifiedFormPages("Message")
> loDD = loForm.Controls("CaseCategory")
> loDD.Value = m.tcCatUse
>
> The third line is what is causing my form to one-off. Any idea why or
> what
> I can do about it?
>
> Thanks,
> Mike
>
> "Mike" <(E-Mail Removed)> wrote in message
> news:ENGdnaKESqTfeT3fRVn-(E-Mail Removed)...
>> Hello - I have a custom Email form in Outlook I have designed with a
>> button
>> on it (with script code). I have published the form. I have unchecked
>> the
>> "send form definition with item" at the property sheet.
>>
>> When I click my custom button on the form it works great when I send an
>> Email to myself (as a test) in Outlook. But, when I send the Email from
>> my
>> application it does not work. I'm thinking there is something wrong with
>> the code in my application and how it is launching the form. If I click
>> Form, Run this form then the custom button works either way (whether I
>> send
>> the form directly from outlook or from my application). I am using this
>> code (Visual FoxPro Code):
>>
>> loNameSpace = loApp.GetNameSpace("MAPI")
>> loOutbox = loNameSpace.GetDefaultFolder(4)
>> loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
>> loMsg.Display
>>
>> Do I need to change my code? I can't figure out why when I send it
>> through
>> Outlook everything works but when I send it through my application it
>> doesn't. I'm thinking my code is not accessing the published forms in
>> Outlook. I don't know Outlook programming very well so all help would be
>> appreciated. Thanks.
>>
>>
>> Mike
>>
>>
>>
>>

>
>



 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      4th Jun 2005
Forgot to mention, I'm using Outlook 2002.

Mike

"Mike" <(E-Mail Removed)> wrote in message
news:ruudnSK2RPeRZz3fRVn-(E-Mail Removed)...
> Hi Sue - I have narrowed it down even further. I have found that if I
> use:
>
> .UserProperties.Find("CaseCategory").Value = "TESTING"
>
> then everything works and the form is not "one-offed" But, it is a
> dropdown so I would like to populate the dropdown box. If I do it this
> way:
>
> loForm = .GetInspector.ModifiedFormPages("Message")
> loDD = loForm.Controls("CaseCategory")
> loDD.PossibleValues = m.tcCatAll
> loDD.Value = "Test"
>
> the form is again "one offed" So it has something to do with setting
> PossibleValues or even Values that is oneoffing the form. Lines 1 and 2
> above in the code do not oneoff the form but lines 3 and 4 oneoff the
> form. Is there another way to set the PossibleValues without using a
> GetInspector or something else I can do? I have tested this with
> breakpoints and I know the code above oneoffs the form.
>
> Thanks,
> Mike
>
> "Sue Mosher [MVP-Outlook]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> Why are you setting a control value instead of the value of the property
> bound to that control? What is m? In any case, setting control values is
> not a known one-off cause. I bet it's something else.
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Mike" <(E-Mail Removed)> wrote in message
> news:j9qdnUYwYbR4dj3fRVn-(E-Mail Removed)...
>>I found out where in my code the form is being "one offed" such that the
>> button is not working. When I try and insert text into my custom fields
>> it
>> is being one offed. This is the code I'm using (visual foxpro):
>>
>> loForm = .GetInspector.ModifiedFormPages("Message")
>> loDD = loForm.Controls("CaseCategory")
>> loDD.Value = m.tcCatUse
>>
>> The third line is what is causing my form to one-off. Any idea why or
>> what
>> I can do about it?
>>
>> Thanks,
>> Mike
>>
>> "Mike" <(E-Mail Removed)> wrote in message
>> news:ENGdnaKESqTfeT3fRVn-(E-Mail Removed)...
>>> Hello - I have a custom Email form in Outlook I have designed with a
>>> button
>>> on it (with script code). I have published the form. I have unchecked
>>> the
>>> "send form definition with item" at the property sheet.
>>>
>>> When I click my custom button on the form it works great when I send an
>>> Email to myself (as a test) in Outlook. But, when I send the Email from
>>> my
>>> application it does not work. I'm thinking there is something wrong
>>> with
>>> the code in my application and how it is launching the form. If I click
>>> Form, Run this form then the custom button works either way (whether I
>>> send
>>> the form directly from outlook or from my application). I am using this
>>> code (Visual FoxPro Code):
>>>
>>> loNameSpace = loApp.GetNameSpace("MAPI")
>>> loOutbox = loNameSpace.GetDefaultFolder(4)
>>> loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
>>> loMsg.Display
>>>
>>> Do I need to change my code? I can't figure out why when I send it
>>> through
>>> Outlook everything works but when I send it through my application it
>>> doesn't. I'm thinking my code is not accessing the published forms in
>>> Outlook. I don't know Outlook programming very well so all help would
>>> be
>>> appreciated. Thanks.
>>>
>>>
>>> Mike
>>>
>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      4th Jun 2005
Here's the culprit:

loDD.PossibleValues = m.tcCatAll

Instead, use the control's AddItem method or Row or Column property to populate the list. See http://www.outlookcode.com/d/formcontrols.htm#listcombo


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


"Mike" <(E-Mail Removed)> wrote in message news:ruudnSK2RPeRZz3fRVn-(E-Mail Removed)...
> Hi Sue - I have narrowed it down even further. I have found that if I use:
>
> .UserProperties.Find("CaseCategory").Value = "TESTING"
>
> then everything works and the form is not "one-offed" But, it is a dropdown
> so I would like to populate the dropdown box. If I do it this way:
>
> loForm = .GetInspector.ModifiedFormPages("Message")
> loDD = loForm.Controls("CaseCategory")
> loDD.PossibleValues = m.tcCatAll
> loDD.Value = "Test"
>
> the form is again "one offed" So it has something to do with setting
> PossibleValues or even Values that is oneoffing the form. Lines 1 and 2
> above in the code do not oneoff the form but lines 3 and 4 oneoff the form.
> Is there another way to set the PossibleValues without using a GetInspector
> or something else I can do? I have tested this with breakpoints and I know
> the code above oneoffs the form.


 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      4th Jun 2005
Sue - yes that seems to be the culprit and the AddItem is the workaround. I
don't understand the reason Microsoft Outlook does a "one-off" when using
PossibleValues. Any thoughts on why and why in general the One-Off was
implemented?

Thanks again for all your help.
Mike

"Sue Mosher [MVP-Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Here's the culprit:

loDD.PossibleValues = m.tcCatAll

Instead, use the control's AddItem method or Row or Column property to
populate the list. See
http://www.outlookcode.com/d/formcontrols.htm#listcombo


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


"Mike" <(E-Mail Removed)> wrote in message
news:ruudnSK2RPeRZz3fRVn-(E-Mail Removed)...
> Hi Sue - I have narrowed it down even further. I have found that if I
> use:
>
> .UserProperties.Find("CaseCategory").Value = "TESTING"
>
> then everything works and the form is not "one-offed" But, it is a
> dropdown
> so I would like to populate the dropdown box. If I do it this way:
>
> loForm = .GetInspector.ModifiedFormPages("Message")
> loDD = loForm.Controls("CaseCategory")
> loDD.PossibleValues = m.tcCatAll
> loDD.Value = "Test"
>
> the form is again "one offed" So it has something to do with setting
> PossibleValues or even Values that is oneoffing the form. Lines 1 and 2
> above in the code do not oneoff the form but lines 3 and 4 oneoff the
> form.
> Is there another way to set the PossibleValues without using a
> GetInspector
> or something else I can do? I have tested this with breakpoints and I
> know
> the code above oneoffs the form.



 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      4th Jun 2005
It makes a change to the form definition itself, and Outlook can persist that change only by storing the form definition in the item, which is what a one-off is.

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


"Mike" <(E-Mail Removed)> wrote in message news:MZ-dnRxCtq6RuzzfRVn-(E-Mail Removed)...
> Sue - yes that seems to be the culprit and the AddItem is the workaround. I
> don't understand the reason Microsoft Outlook does a "one-off" when using
> PossibleValues. Any thoughts on why and why in general the One-Off was
> implemented?
>
> Thanks again for all your help.
> Mike
>
> "Sue Mosher [MVP-Outlook]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> Here's the culprit:
>
> loDD.PossibleValues = m.tcCatAll
>
> Instead, use the control's AddItem method or Row or Column property to
> populate the list. See
> http://www.outlookcode.com/d/formcontrols.htm#listcombo


>
> "Mike" <(E-Mail Removed)> wrote in message
> news:ruudnSK2RPeRZz3fRVn-(E-Mail Removed)...
>> Hi Sue - I have narrowed it down even further. I have found that if I
>> use:
>>
>> .UserProperties.Find("CaseCategory").Value = "TESTING"
>>
>> then everything works and the form is not "one-offed" But, it is a
>> dropdown
>> so I would like to populate the dropdown box. If I do it this way:
>>
>> loForm = .GetInspector.ModifiedFormPages("Message")
>> loDD = loForm.Controls("CaseCategory")
>> loDD.PossibleValues = m.tcCatAll
>> loDD.Value = "Test"
>>
>> the form is again "one offed" So it has something to do with setting
>> PossibleValues or even Values that is oneoffing the form. Lines 1 and 2
>> above in the code do not oneoff the form but lines 3 and 4 oneoff the
>> form.
>> Is there another way to set the PossibleValues without using a
>> GetInspector
>> or something else I can do? I have tested this with breakpoints and I
>> know
>> the code above oneoffs the form.

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read data from outlook custom form and export it to MS SQL Server DB Ilin Start via OfficeKB.com Microsoft Outlook VBA Programming 2 6th Oct 2005 01:22 PM
Outlook Read Email does not run my custom form (still) Mike Microsoft Outlook 7 4th Jun 2005 01:40 PM
Outlook Read Email Does Not Run My Custom Form Mike Microsoft Outlook Form Programming 0 3rd Jun 2005 10:57 PM
Outlook Read Email Does Not Run My Custom Form Mike Appell Microsoft Outlook 12 12th May 2005 01:40 PM
save a custom message form as msg file in read mode in outlook 200 =?Utf-8?B?bGlseQ==?= Microsoft Outlook Interoperability 6 23rd Nov 2004 02:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:25 PM.