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