 |
|
|
|
| Author |
Message |
Judy Voyles
Joined: 31 Jan 2008 Posts: 5
|
Posted: Wed Feb 06, 2008 3:22 pm Post subject: How do I remove a published form programatically? |
|
|
I have a published form that I have distributed to several users and they
have published it in there 'Personal Forms Library'. I am needing to remove
this form from the 'Personal Forms Library' with a script file so that I can
publish another form with the same name but a different message class.
I use the following code to locate the form description object but nothing I
have tried from this point will allow me to remove it.
Set objOL = CreateObject("Outlook.Application")
set olns = objOL.GetNameSpace("MAPI")
Set myfldr = olns.GetDefaultFolder(6)
numitms = myfldr.items.Count
for I = 1 to numitms
set myitem = myfldr.items(I).formdescription
if myitem.messageclass = "IPM.Note.ADS Request" then
?????????????????
end if
next
msgbox "Done"
If anyone has any suggestions....
Thanks
Archived from group: microsoft>public>outlook>program_forms |
|
| Back to top |
|
 |
Sue Mosher [MVP-Outlook]
Joined: 12 Aug 2007 Posts: 656
|
Posted: Wed Feb 06, 2008 7:13 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Unless you have Outlook 2007, that task requires a low-level API such as CDO 1.21 or Redemption, which can access the hidden form definition item. See http://www.outlookcode.com/article.aspx?ID=35 for code samples.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Judy Voyles" wrote in message @microsoft.com...
>I have a published form that I have distributed to several users and they
> have published it in there 'Personal Forms Library'. I am needing to remove
> this form from the 'Personal Forms Library' with a script file so that I can
> publish another form with the same name but a different message class.
>
> I use the following code to locate the form description object but nothing I
> have tried from this point will allow me to remove it.
>
> Set objOL = CreateObject("Outlook.Application")
> set olns = objOL.GetNameSpace("MAPI")
>
> Set myfldr = olns.GetDefaultFolder(6)
> numitms = myfldr.items.Count
> for I = 1 to numitms
> set myitem = myfldr.items(I).formdescription
> if myitem.messageclass = "IPM.Note.ADS Request" then
>
> ?????????????????
>
> end if
> next
> msgbox "Done"
>
> If anyone has any suggestions....
>
> Thanks
> |
|
| Back to top |
|
 |
Judy Voyles
Joined: 31 Jan 2008 Posts: 5
|
Posted: Wed Feb 06, 2008 5:36 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Can I use CDO is VBscript or will I need to use Redemption with my .Net IDE?
"Sue Mosher [MVP-Outlook]" wrote:
> Unless you have Outlook 2007, that task requires a low-level API such as CDO 1.21 or Redemption, which can access the hidden form definition item. See http://www.outlookcode.com/article.aspx?ID=35 for code samples.
>
> --
> Sue Mosher, Outlook MVP
> Author of Microsoft Outlook 2007 Programming:
> Jumpstart for Power Users and Administrators
> http://www.outlookcode.com/article.aspx?id=54
>
>
> "Judy Voyles" wrote in message @microsoft.com...
> >I have a published form that I have distributed to several users and they
> > have published it in there 'Personal Forms Library'. I am needing to remove
> > this form from the 'Personal Forms Library' with a script file so that I can
> > publish another form with the same name but a different message class.
> >
> > I use the following code to locate the form description object but nothing I
> > have tried from this point will allow me to remove it.
> >
> > Set objOL = CreateObject("Outlook.Application")
> > set olns = objOL.GetNameSpace("MAPI")
> >
> > Set myfldr = olns.GetDefaultFolder(6)
> > numitms = myfldr.items.Count
> > for I = 1 to numitms
> > set myitem = myfldr.items(I).formdescription
> > if myitem.messageclass = "IPM.Note.ADS Request" then
> >
> > ?????????????????
> >
> > end if
> > next
> > msgbox "Done"
> >
> > If anyone has any suggestions....
> >
> > Thanks
> >
> |
|
| Back to top |
|
 |
Sue Mosher [MVP-Outlook]
Joined: 12 Aug 2007 Posts: 656
|
Posted: Wed Feb 06, 2008 8:57 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Given that CDO 1.21 is not supported in .NET, Redemption would be the better choice, IMO.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Judy Voyles" wrote in message @microsoft.com...
> Can I use CDO is VBscript or will I need to use Redemption with my ..Net IDE?
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
>> Unless you have Outlook 2007, that task requires a low-level API such as CDO 1.21 or Redemption, which can access the hidden form definition item. See http://www.outlookcode.com/article.aspx?ID=35 for code samples.
>>
>> "Judy Voyles" wrote in message @microsoft.com...
>> >I have a published form that I have distributed to several users and they
>> > have published it in there 'Personal Forms Library'. I am needing to remove
>> > this form from the 'Personal Forms Library' with a script file so that I can
>> > publish another form with the same name but a different message class.
>> >
>> > I use the following code to locate the form description object but nothing I
>> > have tried from this point will allow me to remove it.
>> >
>> > Set objOL = CreateObject("Outlook.Application")
>> > set olns = objOL.GetNameSpace("MAPI")
>> >
>> > Set myfldr = olns.GetDefaultFolder(6)
>> > numitms = myfldr.items.Count
>> > for I = 1 to numitms
>> > set myitem = myfldr.items(I).formdescription
>> > if myitem.messageclass = "IPM.Note.ADS Request" then
>> >
>> > ?????????????????
>> >
>> > end if
>> > next
>> > msgbox "Done"
>> >
>> > If anyone has any suggestions....
>> >
>> > Thanks
>> >
>> |
|
| Back to top |
|
 |
Judy Voyles
Joined: 31 Jan 2008 Posts: 5
|
Posted: Mon Feb 11, 2008 2:41 pm Post subject: Re: How do I remove a published form programatically? |
|
|
I have looked all over in the Redemption object model and for sample code to
try to figure out just exaclty how to access the Forms folders with
Redemption. I have downloaded OutlookSpy and can find the information using
that so I know it must be something accessible. Maybe I'm just not
understanding something. I just don't see anything that references that
'Personal Forms' or any other forms folder. On the Microsoft support site I
found something about a form viewer in MAPI but I can't find anything like
that in Redemption.
Perhaps someone could point me in the right direction?
"Sue Mosher [MVP-Outlook]" wrote:
> Given that CDO 1.21 is not supported in .NET, Redemption would be the better choice, IMO.
>
> --
> Sue Mosher, Outlook MVP
> Author of Microsoft Outlook 2007 Programming:
> Jumpstart for Power Users and Administrators
> http://www.outlookcode.com/article.aspx?id=54
>
>
> "Judy Voyles" wrote in message @microsoft.com...
> > Can I use CDO is VBscript or will I need to use Redemption with my ..Net IDE?
> >
> > "Sue Mosher [MVP-Outlook]" wrote:
> >
> >> Unless you have Outlook 2007, that task requires a low-level API such as CDO 1.21 or Redemption, which can access the hidden form definition item. See http://www.outlookcode.com/article.aspx?ID=35 for code samples.
>
> >>
> >> "Judy Voyles" wrote in message @microsoft.com...
> >> >I have a published form that I have distributed to several users and they
> >> > have published it in there 'Personal Forms Library'. I am needing to remove
> >> > this form from the 'Personal Forms Library' with a script file so that I can
> >> > publish another form with the same name but a different message class.
> >> >
> >> > I use the following code to locate the form description object but nothing I
> >> > have tried from this point will allow me to remove it.
> >> >
> >> > Set objOL = CreateObject("Outlook.Application")
> >> > set olns = objOL.GetNameSpace("MAPI")
> >> >
> >> > Set myfldr = olns.GetDefaultFolder(6)
> >> > numitms = myfldr.items.Count
> >> > for I = 1 to numitms
> >> > set myitem = myfldr.items(I).formdescription
> >> > if myitem.messageclass = "IPM.Note.ADS Request" then
> >> >
> >> > ?????????????????
> >> >
> >> > end if
> >> > next
> >> > msgbox "Done"
> >> >
> >> > If anyone has any suggestions....
> >> >
> >> > Thanks
> >> >
> >>
> |
|
| Back to top |
|
 |
Carol Marotta
Joined: 11 Feb 2008 Posts: 4
|
Posted: Mon Feb 11, 2008 5:28 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Hi Judy, I'm trying to do the exact same thing as you, I've been looking
in CDO posts as well - no luck. I'm using redemption and even if I
display the properties using hrgetproplist, the form name isn't in the
list but I can see it when I look in Outlook.
Carol
*** Sent via Developersdex http://www.developersdex.com *** |
|
| Back to top |
|
 |
Sue Mosher [MVP-Outlook]
Joined: 12 Aug 2007 Posts: 656
|
Posted: Mon Feb 11, 2008 9:25 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Published forms aren't properties, they're hidden items, which Outlook Spy displays on the Associated Contents tab. In the case of the Personal Forms library, they're hidden items in a hidden folder, called IPM_COMMON_VIEWS in Outlook 2003. The sample at http://groups.google.com/group/microsoft.public.outlook.program_vba/msg/3548d368f6040023 should work fine for CDO 1.21. I'll try to work up a sample using Redemption objects as well.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Carol Marotta" wrote in message @TK2MSFTNGP05.phx.gbl...
> Hi Judy, I'm trying to do the exact same thing as you, I've been looking
> in CDO posts as well - no luck. I'm using redemption and even if I
> display the properties using hrgetproplist, the form name isn't in the
> list but I can see it when I look in Outlook.
>
> Carol |
|
| Back to top |
|
 |
Carol Marotta
Joined: 11 Feb 2008 Posts: 4
|
Posted: Tue Feb 12, 2008 4:13 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Hi Sue, it would be great to see a sample for redemption. This is as
far as I've gotten so far:
Dim objStore As Redemption.RDOStore
Dim objSession As Redemption.RDOSession
Set objSession = CreateObject("Redemption.RDOSession")
objSession.Logon
Set objStore = objSession.Stores.DefaultStore
and then I'd like to check the Common Views folder, here it's #1, but
I'd have to loop through & check the name, anyhow when I check the
common folder hidden objects like this:
debug.print objStore.RootFolder.Folders(1).hiddenItems(i).MessageClass
none of the items are the forms designer message type.
Thanks,
Carol
*** Sent via Developersdex http://www.developersdex.com *** |
|
| Back to top |
|
 |
Carol Marotta
Joined: 11 Feb 2008 Posts: 4
|
Posted: Tue Feb 12, 2008 10:06 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Hi, it's me again. I think the reason why I'm not seeing this form in
Redemption is possibly because it's not published to Personal Folders,
it's published to Outlook Folders. If I publish it to Personal Forms,
then I can see it, no problem using this:
objstore.RootFolder.Folders(1).HiddenItems(4).Fields(&H6800001E)
(it's in folder #1, item #4, this returns the form name)
Is it possible then to retrieve items published to another folder to
delete them?
Thanks!
Carol
*** Sent via Developersdex http://www.developersdex.com *** |
|
| Back to top |
|
 |
Ken Slovak - [MVP - Outlo
Joined: 12 Aug 2007 Posts: 405
|
Posted: Wed Feb 13, 2008 3:17 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Don't use an index value to get Common Views, that's not a good way. Once
you get the Store use the property PR_COMMON_VIEWS_ENTRYID (0x35E60102) to
get the EntryID of the Common Views folder and then get the folder the usual
way using RDOSession.GetFolderFromID.
If there are any forms published in the Personal Forms library they would
have a MessageClass of IPM.Microsoft.FolderDesign.FormsDescription and the
PR_MAILBEAT_BOUNCE_SERVER property (0x6800001E) would have the custom form
MessageClass.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Carol Marotta" wrote in message @TK2MSFTNGP03.phx.gbl...
> Hi Sue, it would be great to see a sample for redemption. This is as
> far as I've gotten so far:
>
> Dim objStore As Redemption.RDOStore
> Dim objSession As Redemption.RDOSession
>
> Set objSession = CreateObject("Redemption.RDOSession")
> objSession.Logon
> Set objStore = objSession.Stores.DefaultStore
>
> and then I'd like to check the Common Views folder, here it's #1, but
> I'd have to loop through & check the name, anyhow when I check the
> common folder hidden objects like this:
>
> debug.print objStore.RootFolder.Folders(1).hiddenItems(i).MessageClass
>
> none of the items are the forms designer message type.
>
> Thanks,
> Carol
>
> *** Sent via Developersdex http://www.developersdex.com *** |
|
| Back to top |
|
 |
Ken Slovak - [MVP - Outlo
Joined: 12 Aug 2007 Posts: 405
|
Posted: Wed Feb 13, 2008 3:21 pm Post subject: Re: How do I remove a published form programatically? |
|
|
See my other post. If a form is published to a folder get the folder's
hidden items collection and look for an item with the message class
IPM.Microsoft.FolderDesign.FormsDescription and use
PR_MAILBEAT_BOUNCE_SERVER to get the custom form message class.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Carol Marotta" wrote in message %23Y8yydbIHA.1164@TK2MSFTNGP02.phx.gbl...
> Hi, it's me again. I think the reason why I'm not seeing this form in
> Redemption is possibly because it's not published to Personal Folders,
> it's published to Outlook Folders. If I publish it to Personal Forms,
> then I can see it, no problem using this:
>
> objstore.RootFolder.Folders(1).HiddenItems(4).Fields(&H6800001E)
>
> (it's in folder #1, item #4, this returns the form name)
>
> Is it possible then to retrieve items published to another folder to
> delete them?
>
> Thanks!
> Carol
>
>
> *** Sent via Developersdex http://www.developersdex.com *** |
|
| Back to top |
|
 |
Carol Marotta
Joined: 11 Feb 2008 Posts: 4
|
Posted: Wed Feb 13, 2008 12:48 pm Post subject: Re: How do I remove a published form programatically? |
|
|
Hi Kevin, thanks for your reply.
>Don't use an index value to get Common Views, that's not a >good way.
Oh, I know, I was just testing it out to see if I was able to get any
results at all.
>If there are any forms published in the Personal Forms >library they
would have a MessageClass of
>IPM.Microsoft.FolderDesign.FormsDescription and the
>PR_MAILBEAT_BOUNCE_SERVER property (0x6800001E) would have >the custom
form MessageClass.
OK, I know for sure that the forms are not published in the Personal
Forms library, they're published to the Calendar folder or something
like that. I didn't develop this app so I can't change it, I'm only
trying to remove any remaining forms if it's uninstalled. Is there a
way to get to the forms if they've been published to another folder?
Thanks again,
Carol
*** Sent via Developersdex http://www.developersdex.com *** |
|
| Back to top |
|
 |
Ken Slovak - [MVP - Outlo
Joined: 12 Aug 2007 Posts: 405
|
Posted: Wed Feb 13, 2008 4:51 pm Post subject: Re: How do I remove a published form programatically? |
|
|
It's Ken, not Kevin.
Yes, find what folder the form is published in and use that folder in code
or use a tool like OutlookSpy or MFCMAPI to manually delete the hidden item
representing the published form.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Carol Marotta" wrote in message
news:%233x3rflbIHA.536@TK2MSFTNGP06.phx.gbl...
> Hi Kevin, thanks for your reply.
>
>>Don't use an index value to get Common Views, that's not a >good way.
>
> Oh, I know, I was just testing it out to see if I was able to get any
> results at all.
>
>>If there are any forms published in the Personal Forms >library they
> would have a MessageClass of
>>IPM.Microsoft.FolderDesign.FormsDescription and the
>>PR_MAILBEAT_BOUNCE_SERVER property (0x6800001E) would have >the custom
> form MessageClass.
>
> OK, I know for sure that the forms are not published in the Personal
> Forms library, they're published to the Calendar folder or something
> like that. I didn't develop this app so I can't change it, I'm only
> trying to remove any remaining forms if it's uninstalled. Is there a
> way to get to the forms if they've been published to another folder?
>
> Thanks again,
> Carol
>
> *** Sent via Developersdex http://www.developersdex.com ***
|
|
| Back to top |
|
 |
|
|
| Related Topics: | View a published form When I try to publish a form and run a test, the reciever see's only two fields. What am I doing wrong?
Excel.xlt Published as Form in Public Folders I have created and Excel XP template and I know I read somewhere a while ago that you can publish Excel templates or even Word templates to a folder within Outlook. What I am trying to do is publish a Purchase Order template that when a user goes into the
Custom form not saving when fields changed programatically Is there a way to force a form as "dirty" so Outlook attempts to save it if someone clicks the 'X'? I am changing the HTMLBody and even a custom field but the if I click the 'X' then the form closes without saving. If I change any field using the GUI then
Remove a Form from Organizational Forms Library Does anyone know how to remove a published form from the Forms Library?
Exchange/Outlook-Synchronization programatically hi, i use Exchange 2003 and Outlook 2003. I'm developing an application in VB.NET. My question: When i insert data in a taskform in Outlook 2003, they aren't immediately in the But I need the data in my |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|