32/64-bit compatible version of Outlook Attachment Manager
-
- Administrator
- Posts: 78466
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: 32/64-bit compatible version of Outlook Attachment Manag
I think I have a solution; I've tested it in Outlook 2007; I want to test it in Outlook 2003 and 2010 tomorrow before posting it here.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 397
- Joined: 24 Jan 2010, 19:43
- Location: Salt Lake City, Utah, USA
Re: 32/64-bit compatible version of Outlook Attachment Manag
Thanks. Apparently I tried to get that part right! But perhaps I didn't handle olEditorWord correctly. We'll wait for Hans' solution with bated breath.StuartR wrote:The code does use .HTMLBody rather than .Body if a variable boolHTMLFormat is true. This is set by the line
boolHTMLFormat = (objItem.GetInspector.EditorType = olEditorHTML)
and is always false on my computers, because objItem.GetInspector.EditorType is olEditorWord
Goshute
I float in liquid gardens
I float in liquid gardens
-
- Administrator
- Posts: 78466
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: 32/64-bit compatible version of Outlook Attachment Manag
I have updated the first post in this thread. The zip file has been replaced with a new version that doesn't remove the formatting from HTML messages in Outlook 2007 and higher. It will still remove formatting from Rich Text messages in ALL versions of Outlook.
If you have already installed the version from January 4, 2011, do the following (it takes considerably longer to write it down than to actually do it):
- Download OLAttachMan7.zip.
- Unzip frmAttachmentManager.frm and frmAttachmentManager.frx to any folder.
- Start Outlook.
- Activate the Visual Basic Editor.
- Expand Forms.
- Select frmAttachmentManager.
- Select File | Remove frmAttachmentManager...
- Click No when prompted to export before removing it.
- Select File | Import File...
- Locate the new, updated version of frmAttachmentManager.frm.
- Click Open.
- Select Debug | Compile Project1 (or whatever name is listed).
- Select File | Save VbaProject.OTM.
- Close the Visual Basic Editor.
If you have already installed the version from January 4, 2011, do the following (it takes considerably longer to write it down than to actually do it):
- Download OLAttachMan7.zip.
- Unzip frmAttachmentManager.frm and frmAttachmentManager.frx to any folder.
- Start Outlook.
- Activate the Visual Basic Editor.
- Expand Forms.
- Select frmAttachmentManager.
- Select File | Remove frmAttachmentManager...
- Click No when prompted to export before removing it.
- Select File | Import File...
- Locate the new, updated version of frmAttachmentManager.frm.
- Click Open.
- Select Debug | Compile Project1 (or whatever name is listed).
- Select File | Save VbaProject.OTM.
- Close the Visual Basic Editor.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12604
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
-
- 3StarLounger
- Posts: 397
- Joined: 24 Jan 2010, 19:43
- Location: Salt Lake City, Utah, USA
Re: 32/64-bit compatible version of Outlook Attachment Manag
Without getting into the weeds too much, what changes did you make?HansV wrote:... a new version that doesn't remove the formatting from HTML messages in Outlook 2007 and higher. It will still remove formatting from Rich Text messages in ALL versions of Outlook.
Goshute
I float in liquid gardens
I float in liquid gardens
-
- Administrator
- Posts: 78466
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: 32/64-bit compatible version of Outlook Attachment Manag
I replaced
boolHTMLFormat = (objItem.GetInspector.EditorType = olEditorHTML)
with
boolHTMLFormat = (objItem.BodyFormat = olFormatHTML)
and I now see that I should have done that twice
I'll update the attachment to the first post - again
boolHTMLFormat = (objItem.GetInspector.EditorType = olEditorHTML)
with
boolHTMLFormat = (objItem.BodyFormat = olFormatHTML)
and I now see that I should have done that twice
I'll update the attachment to the first post - again
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 78466
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: 32/64-bit compatible version of Outlook Attachment Manag
I have updated the first post in this thread with a new version. This time it's not a bug fix, but a tiny addition: a Make New Folder button in the folder browse dialog:
If you have already installed the Outlook Attachment Manager, you only need to extract frmAttachmentManager.frm, frmAttachmentManager and basCallbacks, and replace the frmAttachmentManager userform and basCallbacks module in the Visual Basic Editor in Outlook with the new versions.
If you have already installed the Outlook Attachment Manager, you only need to extract frmAttachmentManager.frm, frmAttachmentManager and basCallbacks, and replace the frmAttachmentManager userform and basCallbacks module in the Visual Basic Editor in Outlook with the new versions.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12604
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: 32/64-bit compatible version of Outlook Attachment Manag
Very useful addition, thank you.
StuartR
-
- 3StarLounger
- Posts: 397
- Joined: 24 Jan 2010, 19:43
- Location: Salt Lake City, Utah, USA
Re: 32/64-bit compatible version of Outlook Attachment Manag
? There was one in my version about 4 years ago (and at present installed on O2003) - what happened to it?HansV wrote: a tiny addition: a Make New Folder button in the folder browse dialog
Goshute
I float in liquid gardens
I float in liquid gardens
-
- Administrator
- Posts: 78466
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: 32/64-bit compatible version of Outlook Attachment Manag
If I remember correctly, the dialog in the original version didn't open to the currently specified folder. The ideal solution would have been to use Application.FileDialog but for some reason this is not available in Outlook (it is in Word, Excel and PowerPoint). So I switched to a Windows API implementation of the folder browse dialog that allowed me to preset the selected folder. But that doesn't have a "Make New Folder" button by default. This weekend I was Googling around and found it's a simple flag setting.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 397
- Joined: 24 Jan 2010, 19:43
- Location: Salt Lake City, Utah, USA
Re: 32/64-bit compatible version of Outlook Attachment Manag
The folder opened for saving files depends on what is specified in the options dialog, but the default that I use is that the file save dialog opens the last folder the tool was used to save files.
So you switched from:
CreateObject("Shell.Application").BrowseForFolder(0, "Select Folder for saving selected files", 0, 0).Items.Item.Path)
Method to the Windows API?
So you switched from:
CreateObject("Shell.Application").BrowseForFolder(0, "Select Folder for saving selected files", 0, 0).Items.Item.Path)
Method to the Windows API?
Goshute
I float in liquid gardens
I float in liquid gardens
-
- Administrator
- Posts: 78466
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: 32/64-bit compatible version of Outlook Attachment Manag
As far as I know, CreateObject("Shell.Application").BrowseForFolder doesn't let you specify a folder to be selected when the dialog opens. You can only specify a root folder, i.e. a folder higher than which the user cannot go - see Shell.BrowseForFolder Method (Windows).
The code by Randy Birch that I currently use does let you specify the folder to be selected when the dialog opens.
The code by Randy Birch that I currently use does let you specify the folder to be selected when the dialog opens.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 397
- Joined: 24 Jan 2010, 19:43
- Location: Salt Lake City, Utah, USA
Re: 32/64-bit compatible version of Outlook Attachment Manag
You are correct ...BrowseForFolder() defaults to one of several common Windows root folders which has to be set as a parameter. But it does have a default "Make New Folder" button.HansV wrote:CreateObject("Shell.Application").BrowseForFolder doesn't let you specify a folder to be selected when the dialog opens. You can only specify a root folder, i.e. a folder higher than which the user cannot go. The code by Randy Birch that I currently use does let you specify the folder to be selected when the dialog opens.
Goshute
I float in liquid gardens
I float in liquid gardens
-
- Administrator
- Posts: 78466
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: 32/64-bit compatible version of Outlook Attachment Manag
I rarely want to create a new folder to save e-mails, but I quickly became irritated by having to navigate through many folders EACH time I wanted to use a different folder. So the ability to specify the start folder was more important to me.
The new version combines the best of both worlds.
The new version combines the best of both worlds.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 397
- Joined: 24 Jan 2010, 19:43
- Location: Salt Lake City, Utah, USA
Re: 32/64-bit compatible version of Outlook Attachment Manag
Agree, and thank you for these improvements.HansV wrote:I quickly became irritated by having to navigate through many folders EACH time I wanted to use a different folder. So the ability to specify the start folder was more important to me.
The new version combines the best of both worlds.
Goshute
I float in liquid gardens
I float in liquid gardens