Linking Microsoft Office Word and Excel

Assume that you want a link in your word document to a cell in your excel spreadsheet. You may know how to do it and this post is not about how to do it, but it is about a problem you may see when you link word document and excel file.
Ok for making the link, you need to copy the specified cell and paste it in your document where ever you like and the paste options button will appear and you may choose the way you’d like the link to be, these are the options you may have:
1) Keep Source Formatting: this will paste it as a text (no link) where the formatting is as it was in the excel
2) Match Destination Formatting: this will paste it as a text (no link) where the formatting is as it was in the word
3) Paste as picture: no link
4) Keep text only: still no link
5) Keep Source Formatting and Link to Excel: linked
6) Match Destination Formatting and Link to Excel: linked

* If you don’t see the "Paste Options Button" you have check your word options, in Word 2007 it is located under Office Button -> Word Options -> Advanced -> "Cut, copy and paste"

So if you want the link you have use the last two options, I mostly use the last one "Match Destination Formatting and Link to Excel".
So where is the problem? I’ll tell you, when you do that you may see the pasted text will be pasted in a new line. For example if you have something like this before setting the link:

WOexcelRD

This would look like this after the link:

WO
excel
RD

and if you try to delete the new lines and make it just like "WOexcelRD" you ma see YOU SIMPLY CAN’T.

So where is problem? the problem lies under the "Field Code РLink", if you press ALT+F9 you would see the field code link (this would toggle between Field and Field Codes) as something link this:
WO{ LINK Excel.Sheet.8 "Book1" "Sheet1!R3C4" a f 5 h * MERGEFORMAT }RD

What the heck is this? Don’t worry I’ll tell you about it in the link code mode you can insert a link code by pressing CTRL+F9 so this is the first step and will make the "GRAY { }" and now you can do the rest. The rest is something like this:
{ LINK Excel.[File name] "[Workbook name]" "[Worksheet name]!R[Row number]C[Column number]" [switches] }

And I’ll tell you what, the problem is in the SWITCHES; so what are they?
They’ll tell the excel how to link, these are some combinations I’ve found:
1. a p (Inserts a picture linked to the cell)
2. a f4 r (Inserts text with formatting using rtf)
3. a t (Inserts plain text)
4. a b (Inserts a bitmap image linked to the cell)
5. a t u (Inserts plain unicode text)

I’ve found those http://www.awomantoldme.com/women/how-to/31467957/merging-from-excel.aspx¬†you might take a look.

But which of the will help you, I gotta tell you "You better stuck with the original one", but with a little change, I’ve found out that if you change the "h" with "r" your problem would be solved.
So here the solution:
1) Copy the cell from Excel
2) Paste it in Word and set the paste option to link
3) Press ALT+F9
4) If it was something link "a f 5 h" change it to "a f 5 r"
5) Press ALT+F9
6) Right click on the pasted text and select "Update Link"
7) This is very important: Send me a comment here and tell me about your experience ūüėÄ

But for more information about Field Codes you may refer to office help, but I’m gonna tell you what you might need.

First for inserting one in Office 2007, Goto insert->Quick Parts->Fields , Select all from Categories, and select Link from "Field names", now you can add those options one by one and see what will happen and you may also click "Field Codes" or "Hide Codes" and see the switches and what will they do, but I’m gonna tell what I’ve used:

a : Update fields automatically

f 5: Format type on update (really I don’t know what is it!!)

r : Insert object as RTF (which is the main solution)

* MERGEFORMAT: Preserve formatting during update

h : Insert object as HTML (which is the main problem)

Sadjad Bahmanpour

Link Layer Topology Discovery (LLTD) Responder for Server 2003

Here is the thing, you have a network full of computers lots o XP & Vista some of them are Windows Server 2003 and little bunch of THE GREAT WINDOWS SERVER 2008 and you open Network and Sharing Center in Vista and Click the "View full map" and just the Vista computers shows up, so what about others, I’ll tell you what:
 
1) For Windows XP you need to install Link Layer Topology Discovery (LLTD) Responder KB922120 http://www.microsoft.com/downloads/details.aspx?FamilyID=4f01a31d-ee46-481e-ba11-37f485fa34ea&DisplayLang=en and then you can see them in Vista full map.
 
2) For Windows 2008 and also Vista if they are in domain mode you need change some "Group Policy Objects" open gpedit.msc -> Computer Configuration -> Administrative Templates -> Network -> Link-Layer Topology Discovery and change "Turn on Mapper I/O (LLTDIO) driver" & "Turn on Responder (RSPDNR) driver" both to enabled and also check "Allow operation while in domain" and also if you what check "Allow operation while in public network" (Which is not recommended).
 
3) The last but not the least for OLD GREAT WINDOWS SERVER 2003: Microsoft has not released any update or KBs for Server 2003 and I HATE THEM when they do these things about this GREAT PRODUCT. So I’m gonna show you how you can install any updates just like this on Server 2003 (Windows Media Player 11 can be installed with this trick on Server 2003, which I did for my brother’s Server 2003):
First you need to run the update on a Server 2003 machine that you can simply copy the containing folders to somewhere, after you run this update it will tell you that this OS is not supported but as you know they first unzip the update then they check for integration so you just need to go to C: and copy newly created folder to somewhere and let that update delete the created folder. So now you have all you need, and there is just one step left and that is to manipulate the update .inf file which check the OS integration so go to "update folder" and there you see "update_SP2GDR.inf" & "update_SP2QFE.inf" these are the files that needed to be manipulated, first make a backup of both of them and then open them via NotePad and these are the line that needed to be changed:
 
    NtBuildToUpdate           = 2600
    NtMajorVersionToUpdate    = 5
    NtMinorVersionToUpdate    = 1
    MaxNtBuildToUpdate        = 2600
    MaxNtMajorVersionToUpdate = 5
    MaxNtMinorVersionToUpdate = 1
 
and you may change them into:
 
    NtBuildToUpdate           = 3790
    NtMajorVersionToUpdate    = 5
    NtMinorVersionToUpdate    = 2
    MaxNtBuildToUpdate        = 3790
    MaxNtMajorVersionToUpdate = 5
    MaxNtMinorVersionToUpdate = 2
 
the 3790 is the build number of Server 2003 and 5.2 is the Windows Version, is that it, No! If you try to run the update.exe some message will come up and tell you that the "Cryptography Service cann’t verify the integration of the update" which means the update.exe knows that you’ve change those files, so we need to trick the "Cryptography Service" which is far to easy than you¬†may think you just need to be fast, the update.exe first check the OS integration which you’ve tricked it and then with a little delay (which of course this delay is related how fast you computer is) the "Cryptography Service" check the package for not being changed so just need to be fast and copy back the original files over the manipulated them just after the update.exe UI came up, so may write some bat files and use the OLD "copy /y source destination" and you may use the "pause" to stop the CMD and wait for your command! That’s it this will install the update, but for me this was not the end, we call this¬†THE TRICK, so that’s what you need to do:
 
Go to Properties of Local Area Connection (if you have more than one LAN card you may do this on the LAN that is connected to the Network) click on Install, then select Protocol and click Add, click Have disk and point to "Update FolderSP2GDRiprspndr.inf" and install this protocol, OK all the pages and close them all, then go to properties and this time Uninstall the protocol, NOW it’s the time to do THE TRICK, after that for not doing the restart go to "Administrative Tools -> Local Serices" and restart the "Network Connections" services by right clicking on the name and selecting RESTART, and this is it! Go back to Vista and refresh the "View Full Map" and you’ll see what you see!
 
Tell me if this work or not by leaving just a comment,
Sadjad Bahmanpour

I want more of Windows Server 2008 RC0

Hi there, This is me again "The One Who Loves Windows Server 2008". If you’ve read my last post about this great product you’ll know that I think this is greatest OS EVER made. So after these days full-time working with win2k8 I tired to think about what I need to full more comfortable, and¬†I know that I need all Vista Ultimate additional applications, so this is a list of vista application which are missing in this great prosuct:
 
  • Windows Sidebar: If you would have tried the beta 3 you may remember that you could install Windows Sidebar via installing "Desktop Experience Feature" but in this release no, may be ballmer does not like Sidebars or Gadgets. Anyway I like it and will install this. All you need is to copy "Windows Sidebar" folder (C:Program FilesWindows Sidebar) from a fresh copy of windows vista (SP1 would be better so the build number would be 6.0.6001.16659) or you can search for it in the web, copy it to your "Program Files" folder and run these in cmd:

"sidebar.exe /RegServer"

"regsvr32 sbdrop.dll"

"regsvr32 wlsrvc.dll"

This is it, and run the sidebar.exe and add gadgets as much as you like, but if you want the control panel item and a shourt cut in accessories you can use my installer. I used most from http://www.wincert.net/forum/index.php?showtopic=1442 so thanks Alky and all those others.
My Installer is an .inf file and after you’ve copied the Windows Sidebar folder you must copy my inf to somewhere in the PATH maybe C:WindowsSystem32 and right click on it then "Install" and when you’re prompted to restart just do it and BINGO you have sidebar installed.
If you need the original sidebar folder you may leave me a comment and I’ll send you¬†a link.
 
  • Windows Vista Mouse Pointer: Just copy this from a Windows Vista, maybe I’ll upload this too.
  • Windows Media Center: This is what I can’t do!!!!
  • Windows DreamScene (After that Stardock Deskscapes): This is what I want the most, but till now I¬†did have¬†no chance!!!!
  • I don’t know more,¬†YOU tell me what you’ve missed the more!

Update #1: The Stardock DeskScapes http://www.stardock.com/products/deskscapes announced that the version 2.0 of they software will be run under all version of Windows Vista not just the Ultimate Version, so thats something good to hear, I mean if it can run under Vista Home or something like that so it can be installed on Server 2008 I think, and the "Windows DreamScene (After that Stardock Deskscapes)" would be solved.

Win2k8 Lover,
Sadjad Bahmanpour

WSUS Synchronization History Cleanup

Today I’ve been synchronizing my friend’s WSUS (Windows Server Update Services), I was in middle of this work that I remembered to check my server "Synchronizations History", WOW this is taking so long (387 history), now I know what I want!
 
"A Solution to clean or cleanup the Synchronization History in WSUS 3.0":
 
So I’ve tried to search the web but no one has the answer but some have the same question which I’d love to hear from them, so then I’ve tried to monitor the SQL Server 2005 via the Management¬†Studio -> Management -> Activity Monitor, and takes about an hour to find these:
 
First "tbEvent", "tbEventInstance", "tbEventMessageTemplate" so check them table out and you’ll see what I see! I’ve got 5000+ events in my "tbEventInstance Table" and thats where my synchronizations are! so you can just simply clear the table via:
 
DELETE FROM [SUSDB].[dbo].[tbEventInstance]
 
I didn’t do that but you may! This might clear all the events occured from the start till now.
 
So second I’ve checked "tbEventMessageTemplate Table" where there is a message for every EventID. check them out and you’ll see Event ID’s between 381 and 387, they are all about synchronization.
Now you may execute this:
 
DELETE FROM [SUSDB].[dbo].[tbEventInstance]
WHERE [EventID]=381 or [EventID]=382 or [EventID]=384 or [EventID]=386 or [EventID]=387
 
and this is what I do and now I have no synchronization history and this will done as fast as possible (means in no time!).
 
So you may now do this after every "Server Cleanup Wizard"! Who now may be someday them Microsoft Workers add this there to…
 
Thanks for reading this and feel free to submit a comment if this helped you!
If you want to refer this site please use "Permalink"!
 
Sadjad Bahmanpour

Make Changes to InstallShield and MSI Packages

This is would be Legall or Illegal to change the Installer package but sometimes the package makers do something that convince me to change their packges. The most convincing situation is when I get "This OS is not Supported" (You know I use the Windows Server 2003 / Windows 2003) on package that will install on Windows XP (which I hate) and when the package says that I JUST WANT TO RIP THE PROGRAMMER APART, so these are the times I want to change the packages (but sometimes there are some other reasons, like serial numbers …).
 
So lets ROLL, there are two most used package types:
 
1) MicrosoftInstaller РMSI: This is very easy, Search the web for Orca (This is part of Windows SDK, but you might find it!) and install it, it is easy to use, just open the .msi file, all the rest is to search for WindowsNT or Version and change the logic  and save the package back.
If you want the installer files, search the web for "Extract msiexec", or refer to http://blogs.msdn.com/heaths/archive/2006/02/14/532200.aspx or Use the "MSI Plugin for PowerArchiver 2007".
 
2) InstallShield Package: If you want package files search the web for "Unshield" this is an Open Source software under SourceForge, but you might search for binary in the web and someone might built it before just for you ;).
But if you want to change, this is the hard part, checkout the Setup.ins or Setup.inx these are what you have to DECOMPILE search the web for Sexy InstallShield Decompiler (SID) this is the best (You can download it from¬†http://www.pediy.com/tools/Decompilers.htm), open the ins or inx file with this application and you’ll see a LARGE code appears for you, the only changes you can make is that after you find appropriate line right-click on it and it will show you the valid changes. Those changes are logicly means you can change "a = b" to "a != b"¬† or "a > b" and this is too hard but with a little luck you can. And something else, sometimes the inx files are encrypted that you have to dectrypt them before, but mine never was encrypted.
 
Last night I used SID for "DigiOnAudio2 Pro" installer and now I have a package which accept every Serial but the corrent one!!!!
 
If you find this helpfull or you have any problem, just leave me a message.
 
************************
¬†Updated: I’ve uploaded some useful (mentioned above) utilities in Windows Live Folders, hope these will help you:
 
************************
 
Thanks,
Sadjad

Internet Explorer Enhanced Security Configuration

Tonight after 2 days I’ve installed the "Visual Studio 2005 – Team Foundation Server" (TFS), and now I love microsoft more and more, this is the best CASE TOOLS I’ve ever seen and worked with (believe me I’ve worked with most of them, I was in a team name "HEROES" working on a great CASE TOOLS ever made, the project never came out comercially but I’ve learn alot in that year and half).
 
But to install the Team Explorer first you need to disable "Internet Explorer Enhanced Security" which placed under "Add/Remove Programs -> Windows Components -> Internet Explorer Enhanced Security Configuration", and after that everything would be as great as a DREAM for a programmer (I have a Visual C++ Solution which has 14 Projects WOW in it, and it worked like a charm for me!!!!).
 
So after that I’ve experienced alot changes in IE 7.0 (under Windows 2003 Enterprise Edition):
 
1) The Internet Explorer download page faster (or I donot know may be just render page faster) (I mean something faster that you cannot imagine).
 
2) Work faster with AJAX based sites like live.com , SO MUCH FASTER, as I’ve thought the internet I’ve used is upgraded to something else
 
3) Now the "Windows Live Sign-in Assistant" works, I’ve always thought that this¬†problem of Windows 2003 but now I know how to solve this!!!
the problem was I always see the last signed in account, just like I never installed the component via Windows Live Messenger.
 
If you are using Windows Server 2003 I recomend you to just try this tweak and see what will happend next.
 
I’ve always thought how IE 7.0 works faster under Windows Vista, or why it is slower under Windows 2003, now I know the answer.
 
The only thing that still amazed me in Windows Vista is the speed of network; If I found something I’ll let you all know about it.
 
Sadjad.

Visual Studio 2005 Service Pack 1, Digital Signature Error

I tried to setup service pack 1 of Microsoft Visual Studio 2005 from WSUS 2.0 after a long time waiting (you know it is too large) it gets an error, I tried to extarct the executable file from wsus and install it separatly from WSUS, it get "Error 1718. File was rejected by digital signature policy" I search the net for this error and found "kb 925336" in microsoft support web site http://support.microsoft.com/kb/925336, there is a workaound which worked for me, this error only occured under Team Suite edition (As I think).
 
The workaround siad to work on XP but you know I tried under Windows 2003 Server Enterprise Edition and worked like a charm.
 
Sadjad