Outlook VBA code for HTML newsletter

This is an MS Outlook 2013 code to insert an HTML file into an email. File can have CSS definitions and external links to photos.

1- Go to file -> Options.2- In the “Customize Ribbon” section, check “Developer” in the Customize the Ribbon / Main Tabs panel (right) – Click OK
3- Open the Developer tab in the Ribbon. Click on Macros, Macros, Type “InsertHTML” and Create
4- In the Microsoft VBA window, click on tools -> References and make sure Microsoft Office 15.0 Object Library and Microsoft Word 15.0 Object Library are both checked- press OK
5- Copy and paste the following code:

Sub InsertHTML()
Dim insp As Inspector
Set insp = ActiveInspector
If insp.IsWordMail Then
Dim wordDoc As Word.Document
Set wordDoc = insp.WordEditor
Dim FileToOpen As String
FileToOpen = InputBox(“filename?”)
wordDoc.Application.Selection.InsertFile FileToOpen, , False, False, False
End If
End Sub

6- Save and close the Microsoft VBA editor
7- In the main menu, click on the developer tab in the ribbon, click on “Macro Security”. Select “Notification for all Macros”.8- Open a new message. Place the cursor in the empty message, go to Developer, click on Macro and select the Project1.InsertHTML macro.
9- When prompted enter the HTML file to import location.

 

Simple way to auto-open and auto-close lightbox using Javascript

The idea is to use lightbox to display a pop-up image or text after a page has loaded.

The first step is to reference the link for the lightbox popup. This can be done by adding an “id” to the hyperlink tag (in bold and red):

<a href=”Images/nye.jpg” data-lightbox=”NYE” title=”New Year’s Eve at the HangOut!” id=”NYE”>

The second step is to add the necessary Javascript code just before the closing HTML tag:

<script type=”text/javascript”>
$(document).ready(function () {
document.getElementById(“NYE”).click(); //simulates a link click
setTimeout(‘document.getElementsByClassName(“lb-close”)[0].click();’, 10000); //waits 10 seconds and then hides closes the lightbox window
});
</script>

This script was tested successfully on Firefox and Google Chrome for Android.

Beginner’s guide to WordPress

This tutorial will guide you through the steps to create a blog using WordPress.
Getting Started

Registration
1.    Go to http://www.wordpress.com and click on the “get started” button.

i1

2.    Fill in the registration form and don’t forget to choose a relevant name for your blog address (actionmovies.wordpress.org, funstories.wordpress.org, myname.wordpress.org, etc.)

i2

3.    When you’re done, click on “Create Blog”. Note that you will be able to upgrade to the paid version from the back end (administration area) at your convenience.

i3

4.    Check your mailbox and verify your email address as soon as you possible. You have a two days limit for this.

i4

5.    Your email subject will look like this:

i5

Setting up your first blog
6.    Go back to WordPress.com and log in to your account (if you’re logged out).  Choose your blog title and tagline (these will appear in the header area of your blog – depending on the theme chosen and options). Depending on the method you’ve used to go back to the site, you may be redirected to the main page (step 11).

i6

7.    Choose your template (this is the layout format of your website). In the example below, we chose the 2012 template:

i6

8.    Wordpress.com offers you an option to sync with Facebook or Twitter. Your posts will automatically be shared on both platforms if you use the Facebook or Twitter Connect options:

i6

Creating your first post

9.    It’s time to start blogging! Create any type of post from the available options – In the example below, we chose “text” which is the easiest type to start with:

i6

10.    Write a welcome message:

i6

11.    Remember to add a post category. This is very essential in a Blog for organization and readability purposes.

i6

12.    Click on the Publish button to publish your post (or the update button if you’re revisiting your post).

Logging in to WordPress account
13.    The next time you log in to WordPress.com, you will be redirected to your account page where you can have and manage different blogs.

i6

14.    On the “My Blog” page, you have your blog’s list and the option to add other blogs (note the “create another blog” option under “My Blog” on the left). To access your current blog, click on it’s name.

i6

Logging in to the administration area

15.    This is your blog. You can, at any moment, click on your username (upper menu) to access the Dashboard (Administration area).

i6

Creating a page
16.    There are two major types of publications: pages and posts. Pages are mainly static pages or pages that are not time-related, in the sense that they do not expire. For instance, your contact info, the description of the blog, your résumé. Posts, on the other hand, are time relevant. These can be recipes, new products information, news, comments, etc. Create your first page under Dashboard > Pages.

i6

17.    Creating a page is very similar to writing a post. Just type a title and the content in the dedicated form. Note the “Kitchen Sink” button that will display an additional row of commands including “paste as text” and “paste from word” to remove any formatting or try to adapt the format from Microsoft Word to WordPress.

i6

18.    The “Add Media” button allows you to add images and other type of Media (Music, Video, etc.)

i6

19.    You can either drag-and-drop and image to the page or browse for it from your computer. Once it’s done, insert it into page.

i6

20.    Preview then publish your page.

i6

21.    Click on your blog’s name and notice that your page has been automatically added to your blog’s main menu

i6

Customizing the menu
22.    If you need a customized menu, go to Appearance > Menus

i6

23.    Drag and drop Pages, Categories or create custom Links. You can change the placement of menu items by dragging up and down or right and left (submenus). Once you’re done, rename the menu and save it. Note the “auto add pages” option to automatically add new pages to the menu and the menu location which depends on the theme you’ve chosen (some themes may have several menu placements – header, footer, section to the right, etc.).

i6

24.    The remove a menu option, click on the arrow next to it and click “remove”.

i6

25.    In the case of the 2012 theme, there is only one location, “primary”.

i6

Editing a page or a post
26.    To edit a page or page, go to pages > all pages or posts > all posts

Trashing a page
27.    From the administration menu, go to Pages > all pages
28.    Hover the page title and click on “Trash”

i6

Quick edit a page or post
29.    Go to Posts > all posts; Hover the post’s name; Click on Quick Edit. Here you can change the title, change the category, change the status, allow or disallow comments, etc.

i6

Allowing and disallowing comments for a post or page

i6

Managing categories
30.    To manage categories, go to post > categories

Post Slug
31.    Post slug is used to customize the URL (page address) of a post or page. Enter a few lowercase words separated by dashes, describing a post and usually derived from the post title to create a user-friendly (that is readable and without confusing characters) permalink. Post slug substitutes the “%posttitle%” placeholder in a custom permalink structure. Post slug should not be changed and is especially useful if the post title tends to be long or changes frequently.

Themes
32.    Switching blog layouts: you can change your template anytime via menu option appearance > themes.

Placing widgets on the sidebar
33.    Use appearance ? widgets to add interactive elements to sidebar. All you have to do is drag and drop items from the widgets area to the sidebar area. Note the “text” widget to add any time of text to the sidebar. Also note the Top posts & pages that will display your most visited pages.

i6

Changing the Background
34.    Appearance > background

Changing options blog wide (comments & ratings)
35.    Go to settings > discussions and uncheck “allow people to post comments…” to disallow comments on all new posts.
36.    Settings > Rating

i6

Give access to other users
37.    Click on Users from the main menu.
Description of users:
Super Admin – somebody with access to the site network administration features and all other features. See the Create a Network article.
Administrator – somebody who has access to all the administration features within a single site.
Editor – somebody who can publish and manage posts including the posts of other users.
Author – somebody who can publish and manage their own posts.
Contributor – somebody who can write and manage their own posts but cannot publish them.
Subscriber – somebody who can only manage their profile.

Invite a follower
38.    Users > invite

Edit your profile
39.    Users > My profile

Check your statistics
40.    Dashboard > site stats

Adding Social Icons and Online Social Networks (OSN) functionality
41.    Go to Settings  > sharing – In the top area, you can use OSN connect log in to automatically inform your OSN followers and friends when you publish new posts on your blog.
Adding media elements from OSN websites
42.    YouTube

via shortcode:
[youtube=http://www.youtube.com/watch?v=JaNH56Vpg-A&list=RD02Kl3UR74jsk0]

Here’s how to embed a video (easiest way):
1.    Click the Share link under the video.
2.    Click the Embed link.
3.    Copy the code provided in the expanded box.
4.    Paste the code into your blog or website.

Here’s how to embed a playlist:
1.    Click Playlists on the left side of your YouTube page
2.    Click the playlist title you’d like to embed.
3.    Click the Share link.
4.    Click the Embed link.
5.    Copy the embed code that appears in the menu below.
6.    Paste the code into your website or blog.

43.    Instagram
Put one image next to the other in shortcode to achieve best result[instagram url=LINK]

44.    SlideShare

http://www.slideshare.net/

Finding Help

http://en.support.wordpress.com/category/media/