Tuesday, April 13, 2010
DotNetNuke Stylesheet How to Format Code and Other Examples in a Block
If you have code or other instructions you want to show up in a block on your website, see this article.
In DotNetNuke Stylesheet How to Format Code and Other Examples in a Block
Monday, April 12, 2010
How to Include Multiple Forms on One Asp.Net Page
See this article on How to Include Multiple Forms on One Asp.Net Page
Sunday, March 14, 2010
How to Edit HTML Source in Outlook 2003 Message on XP
There was a brilliant post with a macro to edit the html source in Outlook 2003 on Windows XP. I made the tiniest of changes. Would
like to create the original poster, but the item was posted annonymously. Here is my version, using my naming conventions, but I
have to admit the original poster's was more readable. His (or hers) instructions were simpler too. Darn, someone smarter than me.
Instructions
1. In Outlook, go to Tools, Marco, Visual Basic Editor.
2. In the Visual Basic Editor
2.A Create a new Module (not a Class module) like Edit_Html.
2.B Copy in the code below.
2.C In the Visual Basic Editor go to Tools, References. Add references to Microsoft Scripting Runtime and Windows Scripting Host
Object Model.
2.D. Save
3. In Outlook, while editing an html message, press Alt + F8, select the macro Edit_Html.
Here is the code. Nice and simple
'----------------------------------------------------
Public Sub Edit_Html()
Dim filename As String
Dim filesystem As New Scripting.FileSystemObject
Dim item As mailitem
Dim shell As New WshShell
Dim filestream As TextStream
'----------------------------------------------------
' Put html body in a file
'----------------------------------------------------
Set item = ActiveInspector.CurrentItem
filename = filesystem.GetSpecialFolder(TemporaryFolder) & "\" & filesystem.GetTempName
Set filestream = filesystem.CreateTextFile(filename, True, True)
filestream.Write filename & item.HTMLBody
filestream.Close
'----------------------------------------------------
' Read file into wordpad
'----------------------------------------------------
Set filestream = Nothing
shell.Run "wordpad.exe """ & filename & """", , True
'----------------------------------------------------
' After exiting wordpad, read file into htmlbody
'----------------------------------------------------
Set filestream = filesystem.OpenTextFile(filename, ForReading, False, TristateTrue)
item.HTMLBody = filestream.ReadAll
filestream.Close
Set filestream = Nothing
End Sub
'----------------------------------------------------
www.DomainNames.gs for domain names
Wednesday, March 10, 2010
Asp.net Accessing Page Object from Controls During Initialization
reference not set.
After initialization, during the Load phase, the Page object is available.
What if you need the Page object during the initialization phase, such as in the CreateChildControls method?
See here for the solution.
Monday, October 5, 2009
Enable VB macros to run in Outlook
http://office.microsoft.com/en-us/ork2003/CH011480831033.aspx
Code signing certificates cost a few hundred dollars a year. Here is a list of providers from Microsoft.
http://msdn.microsoft.com/en-us/library/ms995347.aspx
To self sign, use selfcert.exe. Run
C:\Program Files\Microsoft Office\OFFICExx\selfcert.exe
http://www.howto-outlook.com/howto/selfcert.htm
In the VB Editor go to Tools, Digital Signature and add the certificate to the project.
Get out of the VB Editor and Outlook and go back in. Outlook will ask if you want to always trust macros from this certificate. Say
yes.
Outlook macro project is here.
File: VbaProject.OTM
Folder: %appdata%\Microsoft\Outlook
Example: C:\Documents and Settings\username\Application Data\Microsoft\Outlook
VbaProject.OTM location
The %APPDATA% variable identifies this location.
See
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=341