![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Here's some background:
I've created some VBScript on a web page that takes a path to a form in the Public Folders, parses it out, traverses the folders to the one containing a form, and then opens the form. For those who have tried to do this and failed, I don't have the code in front of me (I'm at home, can't get to newsgroups directly at work) but I pass the path as a string with ^s as separators (Because hopefully nobody names a Public Folder with a ^ in it) like this: "Public Folders^Folder1^Folder2^Folder3^FormName" I then split that into an array, and use a For Next loop to the UBound -1 to traverse the folders. I then open the Form using mailitem = folder.items.add("IPM.Note." & Array(Ubound(Array))) This works great, IF the user has this form installed in their Outlook. If not, they get a standard blank e-mail message. What I need is code to install the form locally before it tries to open it. I did some Google searches at work today, and found a couple of snippets, but couldn't really translate that into what I needed. Any ideas? Thanks, Dave Hampson P.S. If anyone wants the VBScript that parses the Path to open a form buried inside Public Folders, let me know, I can mail it home and post it. |
Ads |
#2
|
|||
|
|||
![]()
Did you look at the FormDescription.PublishForm method? See http://www.outlookcode.com/d/distributeforms.htm
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "David Hampson" wrote in message ... Here's some background: I've created some VBScript on a web page that takes a path to a form in the Public Folders, parses it out, traverses the folders to the one containing a form, and then opens the form. For those who have tried to do this and failed, I don't have the code in front of me (I'm at home, can't get to newsgroups directly at work) but I pass the path as a string with ^s as separators (Because hopefully nobody names a Public Folder with a ^ in it) like this: "Public Folders^Folder1^Folder2^Folder3^FormName" I then split that into an array, and use a For Next loop to the UBound -1 to traverse the folders. I then open the Form using mailitem = folder.items.add("IPM.Note." & Array(Ubound(Array))) This works great, IF the user has this form installed in their Outlook. If not, they get a standard blank e-mail message. What I need is code to install the form locally before it tries to open it. I did some Google searches at work today, and found a couple of snippets, but couldn't really translate that into what I needed. Any ideas? Thanks, Dave Hampson P.S. If anyone wants the VBScript that parses the Path to open a form buried inside Public Folders, let me know, I can mail it home and post it. |
#3
|
|||
|
|||
![]()
Sue,
I saw that earlier, and I've got that in my code, but didn't have a chance to test it before I left work. I wasn't sure it would work because I was opening a form from a Public Folder and not from an OFT file. My code has the mailitem.formdescription.publishform(2) line right after the mailitem.items.add(IPM.Note.Formname) line. I have a feeling that won't work, but I'll try it tomorrow morning. Thanks, Dave H. "Sue Mosher [MVP-Outlook]" wrote in message ... Did you look at the FormDescription.PublishForm method? See http://www.outlookcode.com/d/distributeforms.htm -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "David Hampson" wrote in message ... Here's some background: I've created some VBScript on a web page that takes a path to a form in the Public Folders, parses it out, traverses the folders to the one containing a form, and then opens the form. For those who have tried to do this and failed, I don't have the code in front of me (I'm at home, can't get to newsgroups directly at work) but I pass the path as a string with ^s as separators (Because hopefully nobody names a Public Folder with a ^ in it) like this: "Public Folders^Folder1^Folder2^Folder3^FormName" I then split that into an array, and use a For Next loop to the UBound -1 to traverse the folders. I then open the Form using mailitem = folder.items.add("IPM.Note." & Array(Ubound(Array))) This works great, IF the user has this form installed in their Outlook. If not, they get a standard blank e-mail message. What I need is code to install the form locally before it tries to open it. I did some Google searches at work today, and found a couple of snippets, but couldn't really translate that into what I needed. Any ideas? Thanks, Dave Hampson P.S. If anyone wants the VBScript that parses the Path to open a form buried inside Public Folders, let me know, I can mail it home and post it. |
#4
|
|||
|
|||
![]()
Sue,
I tried this, but since the form isn't installed yet locally, it just opens a blank e-mail. I went into the Personal Forms Library, and the form was listed. When I double-clicked, it installed it then. I need my code to force that installation so it will then open the correct form, and not a blank e-mail. Any more ideas? Here is my code. (I am a new Google Groups fan. I can get to this group through there) Sub OpenOutlookDoc(FolderPath) aFolders = Split(FolderPath, "^") Set objOutlook = CreateObject("Outlook.Application") Set objNS = objOutlook.GetNamespace("MAPI") Set fldr = objNS.Folders(aFolders(0)) For i = 1 To UBound(aFolders) - 1 Set fldr = fldr.Folders(aFolders(i)) 'msgbox(aFolders(i)) 'check for errors If Err 0 Then Exit Sub Next 'msgbox(FormName) set mailitem = fldr.items.add("IPM.Note." & aFolders(UBound(aFolders))) mailitem.formdescription.displayname = aFolders(UBound(aFolders)) mailitem.formDescription.publishform(2) mailitem.display(0) End Sub -- And the folder path I am passing is formatted as I stated above. Thanks, Dave Hampson Sue Mosher [MVP-Outlook] wrote: Did you look at the FormDescription.PublishForm method? See http://www.outlookcode.com/d/distributeforms.htm -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "David Hampson" wrote in message ... Here's some background: I've created some VBScript on a web page that takes a path to a form in the Public Folders, parses it out, traverses the folders to the one containing a form, and then opens the form. For those who have tried to do this and failed, I don't have the code in front of me (I'm at home, can't get to newsgroups directly at work) but I pass the path as a string with ^s as separators (Because hopefully nobody names a Public Folder with a ^ in it) like this: "Public Folders^Folder1^Folder2^Folder3^FormName" I then split that into an array, and use a For Next loop to the UBound -1 to traverse the folders. I then open the Form using mailitem = folder.items.add("IPM.Note." & Array(Ubound(Array))) This works great, IF the user has this form installed in their Outlook. If not, they get a standard blank e-mail message. What I need is code to install the form locally before it tries to open it. I did some Google searches at work today, and found a couple of snippets, but couldn't really translate that into what I needed. Any ideas? Thanks, Dave Hampson P.S. If anyone wants the VBScript that parses the Path to open a form buried inside Public Folders, let me know, I can mail it home and post it. |
#5
|
|||
|
|||
![]()
If you're using a statement like this to create the item:
set mailitem = fldr.items.add("IPM.Note." & aFolders(UBound(aFolders))) it should work ***if*** the form is published in the folder represented by the fldr variable. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "TowerDave" wrote in message oups.com... Sue, I tried this, but since the form isn't installed yet locally, it just opens a blank e-mail. I went into the Personal Forms Library, and the form was listed. When I double-clicked, it installed it then. I need my code to force that installation so it will then open the correct form, and not a blank e-mail. Any more ideas? Here is my code. (I am a new Google Groups fan. I can get to this group through there) Sub OpenOutlookDoc(FolderPath) aFolders = Split(FolderPath, "^") Set objOutlook = CreateObject("Outlook.Application") Set objNS = objOutlook.GetNamespace("MAPI") Set fldr = objNS.Folders(aFolders(0)) For i = 1 To UBound(aFolders) - 1 Set fldr = fldr.Folders(aFolders(i)) 'msgbox(aFolders(i)) 'check for errors If Err 0 Then Exit Sub Next 'msgbox(FormName) set mailitem = fldr.items.add("IPM.Note." & aFolders(UBound(aFolders))) mailitem.formdescription.displayname = aFolders(UBound(aFolders)) mailitem.formDescription.publishform(2) mailitem.display(0) End Sub -- And the folder path I am passing is formatted as I stated above. Thanks, Dave Hampson Sue Mosher [MVP-Outlook] wrote: Did you look at the FormDescription.PublishForm method? See http://www.outlookcode.com/d/distributeforms.htm "David Hampson" wrote in message ... Here's some background: I've created some VBScript on a web page that takes a path to a form in the Public Folders, parses it out, traverses the folders to the one containing a form, and then opens the form. For those who have tried to do this and failed, I don't have the code in front of me (I'm at home, can't get to newsgroups directly at work) but I pass the path as a string with ^s as separators (Because hopefully nobody names a Public Folder with a ^ in it) like this: "Public Folders^Folder1^Folder2^Folder3^FormName" I then split that into an array, and use a For Next loop to the UBound -1 to traverse the folders. I then open the Form using mailitem = folder.items.add("IPM.Note." & Array(Ubound(Array))) This works great, IF the user has this form installed in their Outlook. If not, they get a standard blank e-mail message. What I need is code to install the form locally before it tries to open it. I did some Google searches at work today, and found a couple of snippets, but couldn't really translate that into what I needed. Any ideas? Thanks, Dave Hampson P.S. If anyone wants the VBScript that parses the Path to open a form buried inside Public Folders, let me know, I can mail it home and post it. |
#6
|
|||
|
|||
![]()
Sue,
The form is published to the Public Folders, and if I go to Tools, Choose Form, and double-click on the form from the Public Folders which causes it to be installed to my machine and THEN click on the link, it works fine. If a user clicks the link before doing that, it just opens a standard blank e-mail message. That is my issue. Obviously we would rather not have to install all of these forms locally, but would rather have the code on the web site take care of that. I really appreciate any assistance you can provide. Thanks, Dave Hampson Sue Mosher [MVP-Outlook] wrote: If you're using a statement like this to create the item: set mailitem = fldr.items.add("IPM.Note." & aFolders(UBound(aFolders))) it should work ***if*** the form is published in the folder represented by the fldr variable. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "TowerDave" wrote in message oups.com... Sue, I tried this, but since the form isn't installed yet locally, it just opens a blank e-mail. I went into the Personal Forms Library, and the form was listed. When I double-clicked, it installed it then. I need my code to force that installation so it will then open the correct form, and not a blank e-mail. Any more ideas? Here is my code. (I am a new Google Groups fan. I can get to this group through there) Sub OpenOutlookDoc(FolderPath) aFolders = Split(FolderPath, "^") Set objOutlook = CreateObject("Outlook.Application") Set objNS = objOutlook.GetNamespace("MAPI") Set fldr = objNS.Folders(aFolders(0)) For i = 1 To UBound(aFolders) - 1 Set fldr = fldr.Folders(aFolders(i)) 'msgbox(aFolders(i)) 'check for errors If Err 0 Then Exit Sub Next 'msgbox(FormName) set mailitem = fldr.items.add("IPM.Note." & aFolders(UBound(aFolders))) mailitem.formdescription.displayname = aFolders(UBound(aFolders)) mailitem.formDescription.publishform(2) mailitem.display(0) End Sub -- And the folder path I am passing is formatted as I stated above. Thanks, Dave Hampson Sue Mosher [MVP-Outlook] wrote: Did you look at the FormDescription.PublishForm method? See http://www.outlookcode.com/d/distributeforms.htm "David Hampson" wrote in message ... Here's some background: I've created some VBScript on a web page that takes a path to a form in the Public Folders, parses it out, traverses the folders to the one containing a form, and then opens the form. For those who have tried to do this and failed, I don't have the code in front of me (I'm at home, can't get to newsgroups directly at work) but I pass the path as a string with ^s as separators (Because hopefully nobody names a Public Folder with a ^ in it) like this: "Public Folders^Folder1^Folder2^Folder3^FormName" I then split that into an array, and use a For Next loop to the UBound -1 to traverse the folders. I then open the Form using mailitem = folder.items.add("IPM.Note." & Array(Ubound(Array))) This works great, IF the user has this form installed in their Outlook. If not, they get a standard blank e-mail message. What I need is code to install the form locally before it tries to open it. I did some Google searches at work today, and found a couple of snippets, but couldn't really translate that into what I needed. Any ideas? Thanks, Dave Hampson P.S. If anyone wants the VBScript that parses the Path to open a form buried inside Public Folders, let me know, I can mail it home and post it. |
#7
|
|||
|
|||
![]()
Oh, yuck.
Here's a possible alternative -- store the form as an .oft file free doc in the folder, then use your code to save the free doc Attachment as a file, invoke the .oft with CreateItemWithTemplate and use the resulting MailItem to publish the form. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "TowerDave" wrote in message oups.com... Sue, The form is published to the Public Folders, and if I go to Tools, Choose Form, and double-click on the form from the Public Folders which causes it to be installed to my machine and THEN click on the link, it works fine. If a user clicks the link before doing that, it just opens a standard blank e-mail message. That is my issue. Obviously we would rather not have to install all of these forms locally, but would rather have the code on the web site take care of that. I really appreciate any assistance you can provide. Thanks, Dave Hampson Sue Mosher [MVP-Outlook] wrote: If you're using a statement like this to create the item: set mailitem = fldr.items.add("IPM.Note." & aFolders(UBound(aFolders))) it should work ***if*** the form is published in the folder represented by the fldr variable. "TowerDave" wrote in message oups.com... Sue, I tried this, but since the form isn't installed yet locally, it just opens a blank e-mail. I went into the Personal Forms Library, and the form was listed. When I double-clicked, it installed it then. I need my code to force that installation so it will then open the correct form, and not a blank e-mail. Any more ideas? Here is my code. (I am a new Google Groups fan. I can get to this group through there) Sub OpenOutlookDoc(FolderPath) aFolders = Split(FolderPath, "^") Set objOutlook = CreateObject("Outlook.Application") Set objNS = objOutlook.GetNamespace("MAPI") Set fldr = objNS.Folders(aFolders(0)) For i = 1 To UBound(aFolders) - 1 Set fldr = fldr.Folders(aFolders(i)) 'msgbox(aFolders(i)) 'check for errors If Err 0 Then Exit Sub Next 'msgbox(FormName) set mailitem = fldr.items.add("IPM.Note." & aFolders(UBound(aFolders))) mailitem.formdescription.displayname = aFolders(UBound(aFolders)) mailitem.formDescription.publishform(2) mailitem.display(0) End Sub -- And the folder path I am passing is formatted as I stated above. Thanks, Dave Hampson Sue Mosher [MVP-Outlook] wrote: Did you look at the FormDescription.PublishForm method? See http://www.outlookcode.com/d/distributeforms.htm "David Hampson" wrote in message ... Here's some background: I've created some VBScript on a web page that takes a path to a form in the Public Folders, parses it out, traverses the folders to the one containing a form, and then opens the form. For those who have tried to do this and failed, I don't have the code in front of me (I'm at home, can't get to newsgroups directly at work) but I pass the path as a string with ^s as separators (Because hopefully nobody names a Public Folder with a ^ in it) like this: "Public Folders^Folder1^Folder2^Folder3^FormName" I then split that into an array, and use a For Next loop to the UBound -1 to traverse the folders. I then open the Form using mailitem = folder.items.add("IPM.Note." & Array(Ubound(Array))) This works great, IF the user has this form installed in their Outlook. If not, they get a standard blank e-mail message. What I need is code to install the form locally before it tries to open it. I did some Google searches at work today, and found a couple of snippets, but couldn't really translate that into what I needed. Any ideas? Thanks, Dave Hampson P.S. If anyone wants the VBScript that parses the Path to open a form buried inside Public Folders, let me know, I can mail it home and post it. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Forms opening blank | plunk25 | Outlook - Using Forms | 5 | June 30th 06 01:54 PM |
OE opens next e-mail auto | Forrest Ganther | Outlook Express | 2 | June 15th 06 06:56 PM |
Why does some of our Outlook forms open blank in Outlook 2003? | Crystal | Outlook - Using Forms | 1 | May 17th 06 05:14 PM |
linking to internet from within Outlook mail message | Trina | Outlook - Installation | 1 | March 22nd 06 09:29 PM |
blank forms | roger | Outlook - Using Forms | 6 | February 1st 06 11:20 PM |