# Pete's Windows, Office, VB & SQL Blog

Problems I have solved (or not) and good ideas I've found

## Evernote replacement: Thinkery early experiences

Evernote are limiting their free account to two devices, if it had been three, no change would be needed.  The cost of the service and it shortcomings,  for the use I make of it means that paying is not value for money.

So what’s the alternative.  My requirement is for something that works on windows and android and can capture web pages, or parts of web pages.  After a short look around, and rejecting Google Notes (they might suddenly decide to close the service, then where am I?).  OneNote is also rejected on the basis that I have only ever put one note in it – that was enough.

I found Thinkery.  Its main attraction is that I can export my Evernote notes and import them into Thinkery.  Their tag line is “Get Your Brain Together.”, clearly mine isn’t tuned in to their way of thinking.  Evernote is organised into Notebooks and Stacks.  Thinkery has tags, in one way so much less restricting, but also requiring some detailed thought.

Problem 1: Tag management

Editing tags is not straight forward, they cannot be edited outside the document, or apparently selected from a list, as in wordpress or blogger.  When content is added it is put under the currently selected tag, then it must be edited, to update the tag, or remove it, or add new ones.  Spaces are not allowed in tags – this is a problem for me, as my notebook names all have spaces.

If you try through Bulk Edit, you still have to type the tag!  When you start typing, a suggestion appears (sometimes), if you click it, the tag will be used (sometimes).

Problem 2: Capturing Web pages.

Simply put the URL in the Search/Add box and the page is captured.  On the first page I tried (BibleGateway.com with a passage of scripture displayed), it captured everything except the verses I had selected.

Problem 3: Look and Feel

One thing that attracted me when I used the easy trail pages was the uncluttered look of the pages.  They are simple, and clean, even if the colours are a little on the pale side, especially the light grey icons for editing etc.  At the end of a ‘thing’ you can click ‘Edit this thing’ to edit the document.  This text is half off the bottom of the page in both Firefox (47.01) and Internet Explorer (11).  Also the scroll bar for the list of things, which is the middle column of three columns, is to the right of the scroll bar for editing the thing, which is the right hand column.  In Internet explorer the scroll bars appear and disappear, which leads to the width changing and therefore the text moving – very annoying.

Decision

Well this is just the start, I will update this with more experiences, but for now I will persevere.

Written by fisherpeter

2016 July 2 at 09:50

Posted in Uncategorized

## Excel VBA – Error Accessing The System Registry

In the VBA Editor Click ‘Tools’ … ‘References’ and up pops the message “Error accessing the System Registry”.  Another unhelpful message, what error? what key?

Fortunately I don’t have to use that too often and there are other machines I can use (where it works fine) when I have to make a change.

Today I found the answer here: https://colinlegg.wordpress.com/2015/08/01/error-accessing-the-system-registry. It is a registry permissions issue caused by Flash, and a very old version, but they obviously haven’t ever chosen to fix it.  I set the permission to a domain group and it works fine now.

The excellent Process Monitor helped me locate the offending key (https://technet.microsoft.com/en-gb/sysinternals/processmonitor), but watch out and use the filters carefully or be swamped, it really does capture a lot.

Written by fisherpeter

2016 May 9 at 20:38

Posted in Excel 2013, Windows 7 (64bit)

Tagged with

## Visual Studio Update Issues

I recently installed Update 4 to Visual Studio, it turned out to be a bad idea.  MSBUILD now seems to have problems.  It seems to fails a lot, and then when it does succeed the builds are always to the 32-bit directory structure, despite me requesting Release|x64.  Builds from within the IDE seem to work, but my process requires MSBUILD.  So why does the Build menu not use MSBUILD? – who knows!

Never mind, UPDATE 5 was out yesterday.  This contained many fixes for the build process, I installed it expectantly.  Now I cannot build at all, either from within the IDE, or with MSBUILD.exe.  The only thing to do is Uninstall Visual Studio, and re-install it.

The Uninstall failed.  I found something via google, (not there when searching MSN) that said run it again.

We will see …

(more later)

Written by fisherpeter

2015 July 28 at 15:09

## VB .net (2013) File System Watcher

My program watches several directories, when a file is detected it is renamed.  When the rename event fires the file is queued for processing (so that I can record it’s status on the DB).  I then start the BackgroundWorker to process the file and update the DB with the result.

Here’s the problem: the BackgroundWorker raised events – ProgressChanged, RunWorkerComplete, but none of them are ever captured.

The program also has a failsafe mechanism, and occasionally scans the directory for files to see if any files have been missed. It’s normally only needed at startup, but it is there so I may as well run it.  For testing I have put a button on the form to run the scan on command.  Now when the BackgroundWorker raises these events (ProgressChanged, RunWorkerComplete) the events actioned and the routines to update the database and the GUI are processed correctly.

Careful analysis of my trace file shows that the GUI runs on thread 1, and the FileSystem watcher runs on thread 4.  So it may be that the thread is not available when the events are raised.  I have no idea how to find that out.

Written by fisherpeter

2015 June 9 at 08:26

Posted in .Net, VB Express 2013

Tagged with

## Compact Directories on Windows server 2008 r2 using Windows 7

According to https://technet.microsoft.com/en-gb/library/cc726045.aspx the COMPACT command will set the files in a directory to Compressed and set the directory so that when new files are added they are automatically compressed.

Set up a directory with two random text files

Z:\ICT - UK\Compacted>compact

Listing Z:\ICT - UK\Compacted\
New files added to this directory will not be compressed.

3604 :      3604 = 1.0 to 1   Test2.txt
5388 :      5388 = 1.0 to 1   Text1.txt

Of 2 files within 1 directories
0 are compressed and 2 are not compressed.
8,992 total bytes of data are stored in 8,992 bytes.
The compression ratio is 1.0 to 1.

Now Compact it:

Z:\ICT - UK\Compacted>compact /C

Setting the directory Z:\ICT - UK\Compacted\ to compress new files [OK]

Compressing files in Z:\ICT - UK\Compacted\

Test2.txt                3604 :      3604 = 1.0 to 1 [OK]
Text1.txt                5388 :      4096 = 1.3 to 1 [OK]

3 files within 2 directories were compressed.
8,992 total bytes of data are stored in 7,700 bytes.
The compression ratio is 1.2 to 1.

Use explorer to uncompress a file and list the result:

 Listing Z:\ICT - UK\Compacted\
New files added to this directory will be compressed.

3604 :      3604 = 1.0 to 1   Test2.txt
5388 :      4096 = 1.3 to 1 C Text1.txt

Of 2 files within 1 directories
1 are compressed and 1 are not compressed.
8,992 total bytes of data are stored in 7,700 bytes.
The compression ratio is 1.2 to 1.

Copy an uncompressed file fom the parent (uncompressed) directory

Z:\ICT - UK\Compacted>copy ..\text3.txt
1 file(s) copied.

and the result is as it should be:

Z:\ICT - UK\Compacted>compact

Listing Z:\ICT - UK\Compacted\
New files added to this directory will be compressed.

3604 :      3604 = 1.0 to 1   Test2.txt
5388 :      4096 = 1.3 to 1 C Text1.txt
5388 :      4096 = 1.3 to 1 C Text3.txt

Of 3 files within 1 directories
2 are compressed and 1 are not compressed.
14,380 total bytes of data are stored in 11,796 bytes.
The compression ratio is 1.2 to 1.

Now move a file from the parent directory:

Z:\ICT - UK\Compacted>move ..\text4.txt
1 file(s) moved.

Z:\ICT - UK\Compacted>compact

Listing Z:\ICT - UK\Compacted\
New files added to this directory will be compressed.

3604 :      3604 = 1.0 to 1   Test2.txt
5388 :      4096 = 1.3 to 1 C Text1.txt
5388 :      5388 = 1.0 to 1   Text4.txt

Of 3 files within 1 directories
1 are compressed and 2 are not compressed.
14,380 total bytes of data are stored in 13,088 bytes.
The compression ratio is 1.1 to 1.

… and it does not get compressed.

This is the functionality I am looking for, how do I achieve it?

Written by fisherpeter

2015 May 27 at 13:31

## Office 2013 (365) annoyances – Word

To sum up Word 2013 is harder to use than Word 2003, here’s why:

# Templates

### Template locations are more buried than ever.

Click File … Options

Scroll to General, Click File Locations

select the file type you want and click Modify.

### Accessing Templates is harder than in 2003

Click File … New

below the search bar look for the work SHARED.  It does not look like a button, but it is clickable.

Now I see my folders (with the wrong name – my folder is called I.T, it displays as I), there are large icons – all the same not previews of the file, and truncated file names.

P.S there’s more to come…

Written by fisherpeter

2014 November 25 at 11:08

Posted in Uncategorized

## Path to Microsoft.Office.Interop.Outlook.dll for Office 2013 (version 15)

I must be missing something.  The path is:

C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Outlook\15.0.0.0__71e9bce111e9429c

the only way I could find it was in a command prompt

C:\Windows\assembly>dir *outlook.dll /s

Now my VB program will compile.

How am I supposed to know?

Written by fisherpeter

2014 July 25 at 10:00