PC Review


Reply
Thread Tools Rate Thread

Automatically add signature with different mailboxes in the sameexchange server

 
 
HammerJoe@gmail.com
Guest
Posts: n/a
 
      27th Jan 2011
Hi,

I hope someone can help me.
Im using Outlook 2007 and I have one mail exchange account with
several mailboxes.
Each mailbox has its own signature.
I have created the different signatures and I would like for Outlook
when creating a new email or replying to one to automatically detect
which mailbox it is and add to the email the predefined signature.

How can this be done?
Thanks.
 
Reply With Quote
 
 
 
 
HammerJoe@gmail.com
Guest
Posts: n/a
 
      8th Feb 2011
On Jan 26, 11:34*pm, "Hammer...@gmail.com" <hammer...@gmail.com>
wrote:
> Hi,
>
> I hope someone can help me.
> Im using Outlook 2007 and I have one mail exchange account with
> several mailboxes.
> Each mailbox has its own signature.
> I have created the different signatures and I would like for Outlook
> when creating a new email or replying to one to automatically detect
> which mailbox it is and add to the email the predefined signature.
>
> How can this be done?
> Thanks.


Could I get some help with this please?
 
Reply With Quote
 
Michael Bednarek
Guest
Posts: n/a
 
      11th Feb 2011
On Tue, 8 Feb 2011 13:01:35 -0800 (PST), HammerJoe@... wrote in
microsoft.public.outlook.program_vba:

>On Jan 26, 11:34*pm, "Hammer...@gmail.com" <hammer...@gmail.com>
>wrote:
>> Hi,
>>
>> I hope someone can help me.
>> Im using Outlook 2007 and I have one mail exchange account with
>> several mailboxes.
>> Each mailbox has its own signature.
>> I have created the different signatures and I would like for Outlook
>> when creating a new email or replying to one to automatically detect
>> which mailbox it is and add to the email the predefined signature.
>>
>> How can this be done?
>> Thanks.

>
>Could I get some help with this please?


You need to develop a method to return a signature name based on
Activeexplorer.CurrentFolder.FolderPath

Then you need to open the file with the signature, read it and insert it
into the message (which needs a different treatment for HTML messages
and text-only messages); all driven by a event triggers (Reply,
ReplyAll, Forward, NewInspector, <inspector>.Activate and possibly
others).

Alternatively, the task might be simplified with
ActiveInspector.CommandBars("Menu Bar") _
.Controls("Insert") _
.Controls("Signature") _
.Controls(folderspecificAddress).Execute
once you worked out which signature name belongs to which folder. This
method depends of course on the local language and on the presence of
those menu items.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
 
Reply With Quote
 
HammerJoe@gmail.com
Guest
Posts: n/a
 
      11th Feb 2011
Michael,

Thank you for the help.
Unfortunately its not much help for me. Although I know a bit of Vba,
I am not familiar with its integration with Outlook.

Would you be kind to have some kind of working SUB that I could use?
Once I see how it works in Outlook I might be able to figure it out.

Thanks again.


>
> You need to develop a method to return a signature name based on
> Activeexplorer.CurrentFolder.FolderPath
>
> Then you need to open the file with the signature, read it and insert it
> into the message (which needs a different treatment for HTML messages
> and text-only messages); all driven by a event triggers (Reply,
> ReplyAll, Forward, NewInspector, <inspector>.Activate and possibly
> others).
>
> Alternatively, the task might be simplified with
> * ActiveInspector.CommandBars("Menu Bar") _
> * * .Controls("Insert") _
> * * .Controls("Signature") _
> * * .Controls(folderspecificAddress).Execute
> once you worked out which signature name belongs to which folder. This
> method depends of course on the local language and on the presence of
> those menu items.
>
> --
> Michael Bednarek *http://mbednarek.com/* "POST NO BILLS"


 
Reply With Quote
 
Michael Bednarek
Guest
Posts: n/a
 
      12th Feb 2011
On Fri, 11 Feb 2011 10:21:16 -0800 (PST), HammerJoe@... wrote in
microsoft.public.outlook.program_vba:

>Michael,
>
>Thank you for the help.
>Unfortunately its not much help for me. Although I know a bit of Vba,
>I am not familiar with its integration with Outlook.
>
>Would you be kind to have some kind of working SUB that I could use?
>Once I see how it works in Outlook I might be able to figure it out.
>
>Thanks again.
>
>> You need to develop a method to return a signature name based on
>> Activeexplorer.CurrentFolder.FolderPath
>>
>> Then you need to open the file with the signature, read it and insert it
>> into the message (which needs a different treatment for HTML messages
>> and text-only messages); all driven by a event triggers (Reply,
>> ReplyAll, Forward, NewInspector, <inspector>.Activate and possibly
>> others).
>>
>> Alternatively, the task might be simplified with
>> * ActiveInspector.CommandBars("Menu Bar") _
>> * * .Controls("Insert") _
>> * * .Controls("Signature") _
>> * * .Controls(folderspecificAddress).Execute
>> once you worked out which signature name belongs to which folder. This
>> method depends of course on the local language and on the presence of
>> those menu items.


The following code works here:

Sub InsertFolderSignature()

Dim strFolder As String

strFolder = ActiveExplorer.CurrentFolder.FolderPath
strFolder = Mid(strFolder, 3, InStr(3, strFolder, "\") - 3)
ActiveInspector.CommandBars("Menu Bar"). _
Controls("Insert"). _
Controls("Signature"). _
Controls(strFolder).Execute
End Sub

The assumption is that there is a signature named exactly as the folder
name; there is no check that this is true nor is there any error
trapping if it isn't. Creating a menu item or a command bar button to
run the macro is left as an exercise for the reader.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically add additional mailboxes =?Utf-8?B?SmFzb24=?= Microsoft Outlook Installation 2 29th Sep 2005 06:53 PM
Outlook Automatically Opening Mailboxes Joe Microsoft Outlook Discussion 0 17th Aug 2005 01:59 PM
Merge mailboxes NOT on an Exchange Server Tim Mostad Microsoft Outlook 1 22nd Nov 2004 12:36 PM
exchange server will not ctreate new mailboxes =?Utf-8?B?SmFzb24=?= Microsoft Outlook Discussion 2 16th Nov 2004 04:26 AM
Mailboxes won't update automatically after moving to Exchange 2003!!! Bill Nguyen Microsoft Outlook 11 22nd Jul 2004 11:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:01 AM.