PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
instantiate public folders
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
instantiate public folders
![]() |
instantiate public folders |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi, I'm relatively new to outlook programming as I've had no real need for
it until now. What I need to do is make it so that my co-worker can save all of her emails as .rtf emails. She's using outlook 2000. I found some code at http://www.slipstick.com/dev/code/zaphtml.htm that allowed me to do that for items in her inbox. The other place she needs to be able to do this from, though, is a public folder called "email archive". I saw at the bottom of th section on outlook 2000 CW where I got the code to take care of her inbox items it gives instructions on how to set this up for other folders. I have not been able to get it to work. I declared the item, and i created the function that would do it, where i'm having problems is in application_startup when i set the items collection = the folder.items, for the inbox the code is Set olInboxItems = objNS.GetDefaultFolder(olFolderInbox).Items, what code would i use to do the same thing for my public folder? Any help would be greately appreciated! Thanks, Chris Coho ccoho@jrwald.com |
|
|
|
#2 |
|
Guest
Posts: n/a
|
You can use the GetFolder() function from
http://www.slipstick.com/dev/code/getfolder.htm to return a MAPI folder object based on a path string. Note, however, that Outlook client event code isn't always the best approach to a public folder programming situation. The ItemAdd event will fire and run the code only when the Outlook client is running. -- Sue Mosher, Outlook MVP Outlook and Exchange solutions at http://www.slipstick.com Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Chris Coho, Jr" <ccoho@jrwald.com> wrote in message news:%23FSnsHyPDHA.3144@tk2msftngp13.phx.gbl... > Hi, I'm relatively new to outlook programming as I've had no real need for > it until now. What I need to do is make it so that my co-worker can save > all of her emails as .rtf emails. She's using outlook 2000. I found some > code at http://www.slipstick.com/dev/code/zaphtml.htm that allowed me to do > that for items in her inbox. The other place she needs to be able to do > this from, though, is a public folder called "email archive". I saw at the > bottom of th section on outlook 2000 CW where I got the code to take care of > her inbox items it gives instructions on how to set this up for other > folders. I have not been able to get it to work. I declared the item, and > i created the function that would do it, where i'm having problems is in > application_startup when i set the items collection = the folder.items, for > the inbox the code is Set olInboxItems = > objNS.GetDefaultFolder(olFolderInbox).Items, what code would i use to do the > same thing for my public folder? > > Any help would be greately appreciated! > > Thanks, > Chris Coho > ccoho@jrwald.com > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
do you know of another solution? or is it possible to only run this when
she reads the messages (that way it only affects the messages it needs to)? "Sue Mosher [MVP]" <suemvp@microsoft.com> wrote in message news:OKNjTXyPDHA.1556@TK2MSFTNGP10.phx.gbl... > You can use the GetFolder() function from > http://www.slipstick.com/dev/code/getfolder.htm to return a MAPI folder > object based on a path string. > > Note, however, that Outlook client event code isn't always the best approach > to a public folder programming situation. The ItemAdd event will fire and > run the code only when the Outlook client is running. > -- > Sue Mosher, Outlook MVP > Outlook and Exchange solutions at http://www.slipstick.com > Author of > Microsoft Outlook Programming - Jumpstart for > Administrators, Power Users, and Developers > http://www.outlookcode.com/jumpstart.aspx > > > "Chris Coho, Jr" <ccoho@jrwald.com> wrote in message > news:%23FSnsHyPDHA.3144@tk2msftngp13.phx.gbl... > > Hi, I'm relatively new to outlook programming as I've had no real need for > > it until now. What I need to do is make it so that my co-worker can save > > all of her emails as .rtf emails. She's using outlook 2000. I found some > > code at http://www.slipstick.com/dev/code/zaphtml.htm that allowed me to > do > > that for items in her inbox. The other place she needs to be able to do > > this from, though, is a public folder called "email archive". I saw at > the > > bottom of th section on outlook 2000 CW where I got the code to take care > of > > her inbox items it gives instructions on how to set this up for other > > folders. I have not been able to get it to work. I declared the item, > and > > i created the function that would do it, where i'm having problems is in > > application_startup when i set the items collection = the folder.items, > for > > the inbox the code is Set olInboxItems = > > objNS.GetDefaultFolder(olFolderInbox).Items, what code would i use to do > the > > same thing for my public folder? > > > > Any help would be greately appreciated! > > > > Thanks, > > Chris Coho > > ccoho@jrwald.com > > > > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
You could use a server script or event sink to change the message class to
that of a custom form that contains the code you need to run. But make sure form works before you go that route -- changing the format as a message is opened could be tricky. "Chris Coho, Jr" <ccoho@jrwald.com> wrote in message news:%23nB7egyPDHA.2460@TK2MSFTNGP10.phx.gbl... > do you know of another solution? or is it possible to only run this when > she reads the messages (that way it only affects the messages it needs to)? > > "Sue Mosher [MVP]" <suemvp@microsoft.com> wrote in message > news:OKNjTXyPDHA.1556@TK2MSFTNGP10.phx.gbl... > > You can use the GetFolder() function from > > http://www.slipstick.com/dev/code/getfolder.htm to return a MAPI folder > > object based on a path string. > > > > Note, however, that Outlook client event code isn't always the best > approach > > to a public folder programming situation. The ItemAdd event will fire and > > run the code only when the Outlook client is running. > > > > "Chris Coho, Jr" <ccoho@jrwald.com> wrote in message > > news:%23FSnsHyPDHA.3144@tk2msftngp13.phx.gbl... > > > Hi, I'm relatively new to outlook programming as I've had no real need > for > > > it until now. What I need to do is make it so that my co-worker can > save > > > all of her emails as .rtf emails. She's using outlook 2000. I found > some > > > code at http://www.slipstick.com/dev/code/zaphtml.htm that allowed me to > > do > > > that for items in her inbox. The other place she needs to be able to do > > > this from, though, is a public folder called "email archive". I saw at > > the > > > bottom of th section on outlook 2000 CW where I got the code to take > care > > of > > > her inbox items it gives instructions on how to set this up for other > > > folders. I have not been able to get it to work. I declared the item, > > and > > > i created the function that would do it, where i'm having problems is in > > > application_startup when i set the items collection = the folder.items, > > for > > > the inbox the code is Set olInboxItems = > > > objNS.GetDefaultFolder(olFolderInbox).Items, what code would i use to do > > the > > > same thing for my public folder? > > > > > > Any help would be greately appreciated! |
|
|
|
#5 |
|
Guest
Posts: n/a
|
hmm, well i appreciate your help. It sounds as though it may just be easier
to remove outlook 2000 and put outlook 97 on her machine to solve the problem, up until this point i've never done any outlook programming and if its a more advanced routine it probably isn't worth all the time it'll take me to learn how to do it -vs- the time outlook 2000 saves her. Thanks again for your help! "Sue Mosher [MVP]" <suemvp@microsoft.com> wrote in message news:%23Kn4XpzPDHA.1720@TK2MSFTNGP11.phx.gbl... > You could use a server script or event sink to change the message class to > that of a custom form that contains the code you need to run. But make sure > form works before you go that route -- changing the format as a message is > opened could be tricky. > > "Chris Coho, Jr" <ccoho@jrwald.com> wrote in message > news:%23nB7egyPDHA.2460@TK2MSFTNGP10.phx.gbl... > > do you know of another solution? or is it possible to only run this when > > she reads the messages (that way it only affects the messages it needs > to)? > > > > "Sue Mosher [MVP]" <suemvp@microsoft.com> wrote in message > > news:OKNjTXyPDHA.1556@TK2MSFTNGP10.phx.gbl... > > > You can use the GetFolder() function from > > > http://www.slipstick.com/dev/code/getfolder.htm to return a MAPI folder > > > object based on a path string. > > > > > > Note, however, that Outlook client event code isn't always the best > > approach > > > to a public folder programming situation. The ItemAdd event will fire > and > > > run the code only when the Outlook client is running. > > > > > > > "Chris Coho, Jr" <ccoho@jrwald.com> wrote in message > > > news:%23FSnsHyPDHA.3144@tk2msftngp13.phx.gbl... > > > > Hi, I'm relatively new to outlook programming as I've had no real need > > for > > > > it until now. What I need to do is make it so that my co-worker can > > save > > > > all of her emails as .rtf emails. She's using outlook 2000. I found > > some > > > > code at http://www.slipstick.com/dev/code/zaphtml.htm that allowed me > to > > > do > > > > that for items in her inbox. The other place she needs to be able to > do > > > > this from, though, is a public folder called "email archive". I saw > at > > > the > > > > bottom of th section on outlook 2000 CW where I got the code to take > > care > > > of > > > > her inbox items it gives instructions on how to set this up for other > > > > folders. I have not been able to get it to work. I declared the > item, > > > and > > > > i created the function that would do it, where i'm having problems is > in > > > > application_startup when i set the items collection = the > folder.items, > > > for > > > > the inbox the code is Set olInboxItems = > > > > objNS.GetDefaultFolder(olFolderInbox).Items, what code would i use to > do > > > the > > > > same thing for my public folder? > > > > > > > > Any help would be greately appreciated! > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
The other thing I'd do is ask *why* she needs to save all messages as .rtf.
"Chris Coho, Jr" <ccoho@jrwald.com> wrote in message news:Oxrpu4zPDHA.304@tk2msftngp13.phx.gbl... > hmm, well i appreciate your help. It sounds as though it may just be easier > to remove outlook 2000 and put outlook 97 on her machine to solve the > problem, up until this point i've never done any outlook programming and if > its a more advanced routine it probably isn't worth all the time it'll take > me to learn how to do it -vs- the time outlook 2000 saves her. > > Thanks again for your help! > > > "Sue Mosher [MVP]" <suemvp@microsoft.com> wrote in message > news:%23Kn4XpzPDHA.1720@TK2MSFTNGP11.phx.gbl... > > You could use a server script or event sink to change the message class to > > that of a custom form that contains the code you need to run. But make > sure > > form works before you go that route -- changing the format as a message is > > opened could be tricky. > > > > "Chris Coho, Jr" <ccoho@jrwald.com> wrote in message > > news:%23nB7egyPDHA.2460@TK2MSFTNGP10.phx.gbl... > > > do you know of another solution? or is it possible to only run this > when > > > she reads the messages (that way it only affects the messages it needs > > to)? > > > > > > "Sue Mosher [MVP]" <suemvp@microsoft.com> wrote in message > > > news:OKNjTXyPDHA.1556@TK2MSFTNGP10.phx.gbl... > > > > You can use the GetFolder() function from > > > > http://www.slipstick.com/dev/code/getfolder.htm to return a MAPI > folder > > > > object based on a path string. > > > > > > > > Note, however, that Outlook client event code isn't always the best > > > approach > > > > to a public folder programming situation. The ItemAdd event will fire > > and > > > > run the code only when the Outlook client is running. > > > > > > > > > > "Chris Coho, Jr" <ccoho@jrwald.com> wrote in message > > > > news:%23FSnsHyPDHA.3144@tk2msftngp13.phx.gbl... > > > > > Hi, I'm relatively new to outlook programming as I've had no real > need > > > for > > > > > it until now. What I need to do is make it so that my co-worker can > > > save > > > > > all of her emails as .rtf emails. She's using outlook 2000. I > found > > > some > > > > > code at http://www.slipstick.com/dev/code/zaphtml.htm that allowed > me > > to > > > > do > > > > > that for items in her inbox. The other place she needs to be able > to > > do > > > > > this from, though, is a public folder called "email archive". I saw > > at > > > > the > > > > > bottom of th section on outlook 2000 CW where I got the code to take > > > care > > > > of > > > > > her inbox items it gives instructions on how to set this up for > other > > > > > folders. I have not been able to get it to work. I declared the > > item, > > > > and > > > > > i created the function that would do it, where i'm having problems > is > > in > > > > > application_startup when i set the items collection = the > > folder.items, > > > > for > > > > > the inbox the code is Set olInboxItems = > > > > > objNS.GetDefaultFolder(olFolderInbox).Items, what code would i use > to > > do > > > > the > > > > > same thing for my public folder? > > > > > > > > > > Any help would be greately appreciated! > > > > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

