EzDev.org

building-blocks

building-blocks - Foundation Building Blocks: Foundation Components, modules, and layouts you can use in your projects. Building Blocks | Foundation 6


excel to word with macro, can't add page number

here is problem: After I start to macro it create a word document. However I can't add page number with macro automatically or manually to word document because of the Building Blocks.dotx . I have added the codes below. Thank you very much.

Sub excelToWord()
Dim appWord As Word.Application
Dim docWord As Word.Document
Dim fPath As String, fName As String
Dim j As Long, calc As Long, LastRow As Long

With Application
    .ScreenUpdating = False
    .DisplayAlerts = False
    calc = .Calculation
    Application.Calculation = xlAutomatic
End With

fPath = ThisWorkbook.Path & "\"

With ActiveSheet
    fName = .Name
    LastRow = .Cells.Find("*", , , , xlByRows, xlPrevious).Row
    For j = LastRow To 1 Step -1
        .Rows(j).Hidden = .Cells(j, 1) = 0
    Next j
    .UsedRange.Copy
End With
Set appWord = New Word.Application
With appWord
    .Visible = True
    Set docWord = .Documents.Add
    With docWord
   .Content.PasteAndFormat 16
    End With
    End With
Set wrdDoc = Nothing
Set wrdApp = Nothing
With ActiveSheet
    LastRow = .Cells.Find("*", , , , xlByRows, xlPrevious).Row
    For j = LastRow To 1 Step -1
        If .Rows(j).Hidden = True Then .Rows(j).Hidden = False
    Next j
End With

With Application
    .Calculation = calc
    .CutCopyMode = False
End With

End Sub


Source: (StackOverflow)

Import Microsoft Word AutoText to LibreOffice

Is it possible to import the Microsoft Word AutoText file (apparently called "building blocks.dotm") to LibreOffice? If yes, how?

Background information:


Source: (StackOverflow)

What is the relationship between building blocks and SOA

Can anyone explain further about what is the relationship between building blocks and SOA?

SOA is a IT architecture. is building blocks a concept in SOA?

Thx in advance.


Source: (StackOverflow)

Word 2007: Get a list of building blocks?

I'm wordering if there is a way (directly or using VBA) to get a list of all the building blocks as they appear in the Building Blocks Organizer, that is, the names of the building blocks, the Gallery, the Category, the Template, the Behavior, etc. I don't want to extract auto text parts or anything like that. I just want to be able to get and print the complete list of Bilding Blocks and the rest of the info dispayed in the Building Blocks Organizer.

Thanks a lot! D


Source: (StackOverflow)

Background missing in region sections of Firefox OS Building Blocks

i am about to write my personal "Hello World Firefox OS App". To be consistent with the system's style guide, I want to use the Building Blocks provided by Mozilla.

Since I want to have a possibility to set some preferences, I decided to copy the drawer example.

While the example code works fine on buildingfirefoxos.com, my own code is missing some white background with a closed sidebar. I think, I'm struggling to use the Building Blocks properly.

This is my source code:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no" />
        <title>
            some simple app
        </title>
        <link rel="stylesheet" rel='nofollow' href="./css/util.css" />
        <link rel='nofollow' href="./style/headers.css" rel="stylesheet" type="text/css">
        <link rel='nofollow' href="./style_unstable/progress_activity.css" rel="stylesheet" type="text/css">
        <link rel='nofollow' href="./style_unstable/drawer.css" rel="stylesheet" type="text/css">

    </head>
    <body  role="application">
        <section data-type="sidebar">
            <header>
                <menu type="toolbar">
                    <a rel='nofollow' href="#content"><span class="icon icon-add">add</span></a>
                </menu>
                <h1>Title <em>(9)</em></h1>
            </header>
            <nav>
                <ul>
                    <li><a rel='nofollow' href="#content">label</a></li>
                    <li><a rel='nofollow' href="#content">label</a></li>
                    <li><a rel='nofollow' href="#content">label</a></li>
                    <li><a rel='nofollow' href="#content">label</a></li>
                </ul>
                <h2>Subtitle</h2>
                <ul>
                    <li><a rel='nofollow' href="#content">label</a></li>
                    <li><a rel='nofollow' href="#content">label</a></li>
                    <li><a rel='nofollow' href="#content">label larger label than the </a></li>
                    <li><a rel='nofollow' href="#content">label</a></li>
                </ul>
            </nav>
        </section>
        <section role="region" id="main">
            <header>
                <a rel='nofollow' href="#content"><span class="icon icon-menu">hide sidebar</span></a>
                <a rel='nofollow' href="#main"><span class="icon icon-menu">show sidebar</span></a>
                <h1>Title</h1>
            </header>
            <progress value="80" max="100"></progress>
            <header>
                <h2>Subtitle</h2>
            </header>
            <article role="main">
                1234
            </article>
        </section>
    </body>
</html>

Here you can see, that the main section is overlapping with the sidebar (as expected), but is missing a background or something, that is hiding the sidebar.

Drawer Building Block with closed side bar Drawer Building Block with opened side bar

Do I have to change some CSS? I would like to use only Building Blocks, since this would help me to reduce time to spend on updates, when the Building Blocks are adapted to new style guides ...

thx in advance : )


Source: (StackOverflow)

Install Blackboard Auto Signon building block

I am creating an application to autologin the blackboard user. I have researched for this a lot, and I came to know that we need an "Auto Signon" building block inside our Blackboard Learn and proceed with some settings.

Can anyone help me to understand how it is done? As I cannot find any link from where I could download it.

I took help from this link.


Source: (StackOverflow)

Openstreetmap: from "address" to "shapefile"

I've been looking for an answer on the web since quite a long time, but I couldn't make it. So, I hope Stackoverflow users could help/advice me a bit.

I have 7 000 addresses (like "67, place Lobligeois 75017 Paris, France") and I would like to get a Shapefile that contains the 7 000 buildings corresponding to these 7 000 addresses.

My idea is to:

  1. Use Mapquest API to get the "OSM node" for these 7 000 "addresses"
  2. Use Overpass API to get, for all buildings in Paris, their "ways" and "nodes"
  3. Match (1) et (3) to get the "ways" corresponding to my 7 000 "nodes/adresses"
  4. Load in QGIS a shapefile (found at download.bbbike.org/osm/bbbike/Paris/) of all Paris buildings (shapefile where "OSM_ID" equals "way")
  5. Find in my shapefile the "ways" obtained in (3) and delete all buildings that do not match.

Is it a good idea? Or is there a simpler way to do it (I hope)? By the way, I am not able to download the data from my step 2, overpass-turbo.eu fails each time. Do you have any idea (is my Bbox too big)?

I would be delighted to get some advices/help.

Charles H.


Source: (StackOverflow)

Issue using Excel VBA to add Watermark to Word Document using BuildingBlockEntry

I am currently trying to use Excel VBA to add a watermark to a Word document. I have been able to do so from Word VBA and have translated the code over to excel to implement other functions, and am getting an error on a specific line. I believe I need to better point to the Word building block when requesting the insert of the watermark, but am unsure.

The error is "The requested member of the collection does not exist" from the line: oWord.Templates(strBBPath).BuildingBlockEntries(strBBName).Insert Where:=oRng, RichText:=True

Here is my code:

    Sub AddWatermark()
     Dim oWord as Word.Application
     Dim oDoc As Word.Document
     Dim oSection As Word.section
     Dim oHeader As Word.HeaderFooter
     Dim oRng As Word.Range
     Dim strName As String
     Dim strPath As String
     Dim strBBPath As String
     Const strBBName As String = "SAMPLE 1" 'The building block name that you want to insert

     strBBPath = "C:\Users\" & (Environ$("Username")) & "\AppData\Roaming\Microsoft\Document Building Blocks\1033\14\Built-In Building Blocks.dotx"

               Dim lngCount As Long

               ' Open the file dialog
               With Application.FileDialog(msoFileDialogOpen)
                   .AllowMultiSelect = True
                   .Show

                   ' Display paths of each file selected
                   For lngCount = 1 To .SelectedItems.Count
                        Set oWord = New Word.Application
                        strPath = .SelectedItems(lngCount)
                        Set oDoc = oWord.Documents.Open(strPath)
                   Next lngCount
               End With

     'oDoc.Save 'save the document
     strName = oDoc.FullName 'Record the document name
     oWord.Visible = True

     'Address each section
     For Each oSection In oDoc.Sections
         'Address each header in the section
         For Each oHeader In oSection.Headers

             Set oRng = oHeader.Range
             oRng.Start = oRng.End 'set the range to the end of the header
             'Insert the built-in building block
             oWord.Templates(strBBPath).BuildingBlockEntries(strBBName).Insert Where:=oRng, RichText:=True

         Next oHeader
     Next oSection

     End Sub

Source: (StackOverflow)

Firefox OS get selection from drawer with Building Blocks

I am trying to do a drawer menu for in my Firefox OS app, based in the Bulding Blocks from Firefox team:

http://buildingfirefoxos.com/building-blocks/drawer.html

At the moment I have a menu button that show and hide the menu, but I can not change to other page when the user click in a different item in the menu.

With this code I can see the Page 1 when the app start, but the page2 is no loaded when I select the button "page 2" in the menu

<section id="index" data-position="current">
    <section data-type="sidebar">
    <header>
        <menu type="toolbar" />
        <a rel='nofollow' href="#"></a>
        </menu>
        <h1>My Menu</h1>
    </header>
    <nav>
        <ul>
            <li>
                <a rel='nofollow' href="#page1">page 1</a>
            </li>
            <li>
                <a rel='nofollow' href="#page2">page 2</a>
            </li>
        </ul>
    </nav>
</section>

<!-- Page 1 -->
<section id="drawer" class="skin-dark" role="region">
    <header class="fixed">
        <a rel='nofollow' href="#"><span class="icon icon-menu">hide sidebar</span></a>
        <a rel='nofollow' href="#drawer"><span class="icon icon-menu">show sidebar</span></a>
        <h1>Page 1</h1>
    </header>
    <article class="content scrollable header">
        <section id="page1_list" data-type="list"></section>
    </article>
</section>

<!-- Page 2 -->
<section id="drawer" class="skin-dark" role="region">
    <header class="fixed">
        <a rel='nofollow' href="#"><span class="icon icon-menu">hide sidebar</span></a>
        <a rel='nofollow' href="#drawer"><span class="icon icon-menu">show sidebar</span></a>
        <h1>Page 2</h1>
    </header>
    <article class="content scrollable header">
        <section id="page2_list" data-type="list"></section>
    </article>
</section>


Source: (StackOverflow)