Reply to comment

How to retrive Outllok default signature

The Outlook signatures are stored in the %APPDATA%\Microsoft\Signatures\ folder in text, RTF and HTML formats.
In case of multiple signatures, the default can be found through Word automation. Tested in Outlook 2003 and later.

This is sample code. Add error handling and adjust to your requirements as necessary.

* The folder name where signatures are stored depends on the Windows language version
* English
lcFilePath = GETENV("APPDATA") + "\Microsoft\Signatures\"
* Spanish 
*lcFilePath = GETENV("APPDATA") + "\Microsoft\Firmas\"
 
loWord = CREATEOBJECT("Word.Application")
loEmOpt = loWord.EmailOptions
loOlSig = loEmOpt.EmailSignature
lcSigFileName = ALLTRIM(loOlSig.NewMessageSignature )
* Text signature
lcPathAndFile = lcFilePath + lcSigFileName + ".txt"
IF FILE(lcPathAndFile )
	lcTextIn = FILETOSTR(lcPathAndFile  )
 
	IF  LEFT( lcTextIn ,2) = 0hFFFE
		* Remove Unicode header
		lcTextIn = SUBSTR(lcTextIn,3)		
	ENDIF	
 
	lcFileContent = STRCONV(lcTextIn ,6)	
	? lcFileContent 
ENDIF

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <java>, <powershell>, <tsql>, <visualfoxpro>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.