<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DEM - Update Outlook signature in Dynamic Environment Manager</title>
    <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817517#M6532</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/3008932"&gt;@lansti&lt;/a&gt;,&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;i can run it manually, but sometimes I'll get the save message for Normal.dot or that Outlook will hang/freeze&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I'm afraid that makes it more of a Word COM automation question than a DEM one, and I can't help with that. Hopefully someone else on this forum has similar requirements as you (or your marketing department&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://communities.vmware.com/html/@677206E94727C39F3BB2721E5A55F2C1/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;) and they can point to a more robust approach.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 15:09:18 GMT</pubDate>
    <dc:creator>DEMdev</dc:creator>
    <dc:date>2020-12-16T15:09:18Z</dc:date>
    <item>
      <title>DEM - Update Outlook signature</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2816321#M6506</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;We currently have 4 annual updates of our outlook signatures, which insert a picture of our company logo, based on seasons. Well, this is brandingstuff that Marketing department wants...&lt;BR /&gt;The challenge is that there is a PS1 script running from DEM during logon, that makes these updates when needed.&lt;BR /&gt;What happens is that outlook seems to hang/freeze, or it will make changes to the normal.dot file, og that normal.dot file suddenly is write protected, which in turn creates problems for the user.&lt;BR /&gt;How are you fixing these changes? Do you use scripts, DEM, GPO or other stuff?&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Appreciate tips&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 09:40:12 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2816321#M6506</guid>
      <dc:creator>lansti</dc:creator>
      <dc:date>2020-12-11T09:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: DEM - Update Outlook signature</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2816944#M6510</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/3008932"&gt;@lansti&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The Outlook signature is just a bunch of files in&amp;nbsp;%APPDATA%\Microsoft\Signatures, right? I suppose the script is run as a DEM logon task, configured to run &lt;EM&gt;&lt;STRONG&gt;After&lt;/STRONG&gt; profile archive import&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;Can you share the (logic of) the script? Does it work correctly if you run the script manually during the session?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 15:33:12 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2816944#M6510</guid>
      <dc:creator>DEMdev</dc:creator>
      <dc:date>2020-12-14T15:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: DEM - Update Outlook signature</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817127#M6521</link>
      <description>&lt;P&gt;Hi This script is trigged by a VBScript we are running during logontask from DEM. After profile archive import.&lt;/P&gt;&lt;P&gt;my powershell looks like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;#Custom variables 
$CompanyName = ‘company’ 
$DomainName = ‘company.com’ 
 
$SigSource = “\\$DomainName\netlogon\OLSignatur\$CompanyName” 
$ForceSignatureNew = '0' #When the signature are forced the signature are enforced as default signature for new messages the next time the script runs. 0 = no force, 1 = force 
$ForceSignatureReplyForward = '0' #When the signature are forced the signature are enforced as default signature for reply/forward messages the next time the script runs. 0 = no force, 1 = force 
 
#Environment variables 
$AppData=(Get-Item env:appdata).value 
$SigPath = ‘\Microsoft\Signaturer’ 
$LocalSignaturePath = $AppData+$SigPath 
$RemoteSignaturePathFull = $SigSource+'\'+$CompanyName+’.docx’ 
$RemoteSignaturePathFullNor = $SigSource+'\'+$CompanyName+'Nor.docx' 
$RemoteSignaturePathFullEng = $SigSource+'\'+$CompanyName+'Eng.docx' 
 
#Get Active Directory information for current user 
$UserName = $env:username 
$Filter = “(&amp;amp;(objectCategory=User)(samAccountName=$UserName)(mail=*))” 
$Searcher = New-Object System.DirectoryServices.DirectorySearcher 
$Searcher.Filter = $Filter 
$ADUserPath = $Searcher.FindOne() 
$ADUser = $ADUserPath.GetDirectoryEntry() 
$ADDisplayName = $ADUser.displayName 
$ADEmailAddress = $ADUser.mail 
$ADTitle = $ADUser.title 
$ADTelePhoneNumber = $ADUser.telephoneNumber 
$ADStreetAddress = $ADUser.streetAddress
$ADPOBox = $ADUser.postOfficeBox
$ADPostalCode = $ADUser.postalCode
$ADCity = $ADUser.l
 
#Setting registry information for the current user 
$CompanyRegPath = “HKCU:\Software\”+$CompanyName 
 
if (Test-Path $CompanyRegPath) 
{} 
else 
{New-Item -path “HKCU:\Software” -name $CompanyName} 
 
if (Test-Path $CompanyRegPath'\Outlook Signature Settings') 
{} 
else 
{New-Item -path $CompanyRegPath -name “Outlook Signature Settings”} 
 
$ForcedSignatureNew = (Get-ItemProperty $CompanyRegPath'\Outlook Signature Settings').ForcedSignatureNew 
$ForcedSignatureReplyForward = (Get-ItemProperty $CompanyRegPath'\Outlook Signature Settings').ForcedSignatureReplyForward 
Set-ItemProperty $CompanyRegPath'\Outlook Signature Settings' -name SignatureSourceFiles -Value $SigSource 
$SignatureSourceFiles = (Get-ItemProperty $CompanyRegPath'\Outlook Signature Settings').SignatureSourceFiles 
 
#Forcing signature for new messages if enabled 
if ($ForcedSignatureNew -eq '1') 
{ 
#Set company signature as default for New messages 
$MSWord = New-Object -com word.application 
$EmailOptions = $MSWord.EmailOptions 
$EmailSignature = $EmailOptions.EmailSignature 
$EmailSignatureEntries = $EmailSignature.EmailSignatureEntries 
$EmailSignature.NewMessageSignature=$CompanyName 
$MSWord.Quit() 
} 
 
#Forcing signature for reply/forward messages if enabled 
if ($ForcedSignatureReplyForward -eq '1') 
{ 
#Set company signature as default for Reply/Forward messages 
$MSWord = New-Object -com word.application 
$EmailOptions = $MSWord.EmailOptions 
$EmailSignature = $EmailOptions.EmailSignature 
$EmailSignatureEntries = $EmailSignature.EmailSignatureEntries 
$EmailSignature.ReplyMessageSignature=$CompanyName 
$MSWord.Quit() 
} 
 
#Copying signature sourcefiles and creating signature if signature-version are different from local version 
##if ($SignatureVersion -eq $SigVersion){} 
##else 
##{ 
#Copy signature templates from domain to local Signature-folder 
Copy-Item “$SignatureSourceFiles\*” $LocalSignaturePath -Recurse -Force 
 
$ReplaceAll = 2 
$FindContinue = 1 
$MatchCase = $True 
$MatchWholeWord = $True 
$MatchWildcards = $False 
$MatchSoundsLike = $False 
$MatchAllWordForms = $False 
$Forward = $True 
$Wrap = $FindContinue 
$Format = $False 
 
#Insert variables from Active Directory to rtf signature-file to Norwegian version
$MSWord = New-Object -com word.application 
$fullPath = $LocalSignaturePath+'\'+$CompanyName+'Nor.docx' 
$MSWord.Documents.Open($fullPath) 
 
$FindText = “DisplayName” 
$ReplaceText = $ADDisplayName.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 
 
$FindText = “Title” 
$ReplaceText = $ADTitle.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$FindText = “TelephoneNumber” 
$ReplaceText = $ADTelePhoneNumber.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$MSWord.Selection.Find.Execute(“Email”) 
$MSWord.ActiveDocument.Hyperlinks.Add($MSWord.Selection.Range, “mailto:”+$ADEmailAddress.ToString(), $missing, $missing, $ADEmailAddress.ToString()) 

$FindText = “StreetAddress” 
$ReplaceText = $ADStreetAddress.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$FindText = “POBox” 
$ReplaceText = $ADPOBox.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$FindText = “PostalCode” 
$ReplaceText = $ADPostalCode.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$FindText = “City” 
$ReplaceText = $ADCity.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 
 
$MSWord.ActiveDocument.Save() 
$saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat], “wdFormatHTML”); 
[ref]$BrowserLevel = “microsoft.office.interop.word.WdBrowserLevel” -as [type] 
 
$MSWord.ActiveDocument.WebOptions.OrganizeInFolder = $true 
$MSWord.ActiveDocument.WebOptions.UseLongFileNames = $true 
$MSWord.ActiveDocument.WebOptions.BrowserLevel = $BrowserLevel::wdBrowserLevelMicrosoftInternetExplorer6 
$path = $LocalSignaturePath+'\'+$CompanyName+”Nor.htm” 
$MSWord.ActiveDocument.saveas([ref]$path, [ref]$saveFormat) 
$MSWord.ActiveDocument.Close() 
$MSWord.Quit() 
 
#Insert variables from Active Directory to rtf signature-file to English version
$MSWord = New-Object -com word.application 
$fullPath = $LocalSignaturePath+'\'+$CompanyName+'Eng.docx' 
$MSWord.Documents.Open($fullPath) 
 
$FindText = “DisplayName” 
$ReplaceText = $ADDisplayName.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 
 
$FindText = “Title” 
$ReplaceText = $ADTitle.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$FindText = “TelephoneNumber” 
$ReplaceText = $ADTelePhoneNumber.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$MSWord.Selection.Find.Execute(“Email”) 
$MSWord.ActiveDocument.Hyperlinks.Add($MSWord.Selection.Range, “mailto:”+$ADEmailAddress.ToString(), $missing, $missing, $ADEmailAddress.ToString()) 

$FindText = “StreetAddress” 
$ReplaceText = $ADStreetAddress.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$FindText = “POBox” 
$ReplaceText = $ADPOBox.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$FindText = “PostalCode” 
$ReplaceText = $ADPostalCode.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 

$FindText = “City” 
$ReplaceText = $ADCity.ToString() 
$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord,    $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap,    $Format, $ReplaceText, $ReplaceAll    ) 
 
$MSWord.ActiveDocument.Save() 
$saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat], “wdFormatHTML”); 
[ref]$BrowserLevel = “microsoft.office.interop.word.WdBrowserLevel” -as [type] 
 
$MSWord.ActiveDocument.WebOptions.OrganizeInFolder = $true 
$MSWord.ActiveDocument.WebOptions.UseLongFileNames = $true 
$MSWord.ActiveDocument.WebOptions.BrowserLevel = $BrowserLevel::wdBrowserLevelMicrosoftInternetExplorer6 
$path = $LocalSignaturePath+'\'+$CompanyName+”Eng.htm” 
$MSWord.ActiveDocument.saveas([ref]$path, [ref]$saveFormat) 
$MSWord.ActiveDocument.Close() 
$MSWord.Quit() 
##} 
 
#Stamp registry-values for Outlook Signature Settings if they doesn`t match the initial script variables. Note that these will apply after the second script run when changes are made in the “Custom variables”-section. 
if ($ForcedSignatureNew -eq $ForceSignatureNew){} 
else 
{Set-ItemProperty $CompanyRegPath'\Outlook Signature Settings' -name ForcedSignatureNew -Value $ForceSignatureNew} 
 
if ($ForcedSignatureReplyForward -eq $ForceSignatureReplyForward){} 
else 
{Set-ItemProperty $CompanyRegPath'\Outlook Signature Settings' -name ForcedSignatureReplyForward -Value $ForceSignatureReplyForward} &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 09:44:24 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817127#M6521</guid>
      <dc:creator>lansti</dc:creator>
      <dc:date>2020-12-15T09:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: DEM - Update Outlook signature</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817472#M6529</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/3008932"&gt;@lansti&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I noticed that the script is using COM to interact with Word; do you have DirectFlex enabled for Word, by any chance?&lt;/P&gt;&lt;P&gt;Does it work correctly if you manually launch the script during the session?&lt;/P&gt;&lt;P&gt;Could it maybe be an option to run the script at &lt;EM&gt;logoff&lt;/EM&gt;, before capturing Outlook's settings, so that the newly updated signature takes effect in the user's next session?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 13:10:35 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817472#M6529</guid>
      <dc:creator>DEMdev</dc:creator>
      <dc:date>2020-12-16T13:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: DEM - Update Outlook signature</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817490#M6531</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/3228914"&gt;@DEMdev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DirectFlex is not enablet, most of our policies are running are running with "apply settings after profile archive import.&lt;BR /&gt;I need this policy to run for new users so the signature is generated during logon, and the signature will follow users since we have this one in our confifile for Outlook:&lt;BR /&gt;[IncludeFolderTrees]&lt;BR /&gt;&amp;lt;AppData&amp;gt;\Microsoft\Signatures&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the VBscript that we are running during logon, will trigger the PS1 script, it will check a registry value, and from here it will run through an IF Else sentence... if it will run the script or not..&lt;/P&gt;&lt;P&gt;What i experience, is that i can run it manually, but sometimes I'll get the save message for Normal.dot or that Outlook will hang/freeze. And then user need to kill the process, but for most users, they do not know how to do this, so they logs out and in again.. then the signatures is fine.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I'm curious about how others out there solve this with instant clone signatures&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 14:24:42 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817490#M6531</guid>
      <dc:creator>lansti</dc:creator>
      <dc:date>2020-12-16T14:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: DEM - Update Outlook signature</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817517#M6532</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/3008932"&gt;@lansti&lt;/a&gt;,&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;i can run it manually, but sometimes I'll get the save message for Normal.dot or that Outlook will hang/freeze&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I'm afraid that makes it more of a Word COM automation question than a DEM one, and I can't help with that. Hopefully someone else on this forum has similar requirements as you (or your marketing department&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://communities.vmware.com/html/@677206E94727C39F3BB2721E5A55F2C1/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;) and they can point to a more robust approach.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 15:09:18 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/DEM-Update-Outlook-signature/m-p/2817517#M6532</guid>
      <dc:creator>DEMdev</dc:creator>
      <dc:date>2020-12-16T15:09:18Z</dc:date>
    </item>
  </channel>
</rss>

