Microsoft.SharePoint.Upgrade.SPUpgradeException

Just in Case:

After 2 hours finding a solution,  i just unistalled INFOPATH 2010, Beta or RTM and i could run SharePoint Products and Technologies without any problem.

Stupid, but works, i don't think i can report a bug from connect because Office Beta ended now.

I Lost or Broke my Office CD, how can i get a new one?

You have lost, broken, or misplaced your original Microsoft Office or Microsoft Publisher installation CD, you can order replacement media from Microsoft.

How to order a replacement CD for Microsoft Office
http://support.microsoft.com/kb/302822

I lost my Office Product Key, what can i do?

For Office 2007 product key request, refer to the following link:
http://support.microsoft.com/kb/823570

Replace lost Office product keys
http://office.microsoft.com/en-us/help/HA011508341033.aspx

Posted by Joao Livio | with no comments

But After All in how many computers can i install and Activate Office 2007

You are allowed to install and activate Office on as many computers as you want. Only no more than the maximum allowed at any one time. Office Professional can be on no more than 2 computers at one time. Home and Student is the only version of Office with 3.

For information on Office 2007 licensing terms and reinstallation, refer the following links:

http://office.microsoft.com/en-us/products/HA102103171033.aspx
http://office.microsoft.com/en-us/products/HA102333141033.aspx

Posted by Joao Livio | with no comments

How to import a Outlook PST Data File Directly to your Data Store

Sometimes is hard when we change computer or a upgrade went wrong to access to our Outlook Data Store. This Tip will help you to troubleshoot this scenario.

NOTE: The screenshots are in Portuguese but i describe the options in English :)

BE SHURE THAT YOUR OUTLOOK IS CLOSED

First Step if you don’t have any Profile Created Go:

Create new profile, follow the article below.
http://support.microsoft.com/kb/829918

1 – Be ware where is your PST

In case of an upgrade should be in “C:\Users\YOUR_USER_NAME\AppData\Local\Microsoft\Outlook

Look for “outlook.pst

If you have a Backup in another place, be shure to find it

2 – Go to your Control Panel and choose Mail

image

3 – Next this window will appear

4 – Choose Data Files, and in the next screen Data Files and click Open Folder

image

image

5 – Copy your PST directly to the Folder and Overwrite the old one.

6 – Start Outlook, your Mails should be all there

Good Luck

Posted by Joao Livio | with no comments

Create tables in a Access Database is using the ADOX Catalog

Introduction

A robust way to create tables in a Access Database is using the ADOX Catalog, in order to use you have to add the reference Microsoft ADO Ext. 2.8 for DDL and Security bellow or above.

Background

In this sample we will create only and change fields in an existing database, so you can manipulate your Tables. this code only work with a MDB file, if you want to use a ACCDB you have to change the connection string to Access 12 provider "Provider=Microsoft.ACE.OLEDB.12.0" and have also installed the "2007 Office System Driver: Data Connectivity Components"

Using the code

You have to give the Full Path to the MDB in string myPath

public bool GenerateLogDatabase(string myPath)
{
CatalogClass cat = new CatalogClass();
string strSQL;
string cs;

try
{
cs = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + myPath + ";" +
"Jet OLEDB:Engine Type=5";

strSQL = "CREATE TABLE Issues (mID AUTOINCREMENT, mUser TEXT(100) NOT NULL " +
", mError TEXT(100) NOT NULL, " +
"mDescription TEXT(100) NOT NULL, mDate DATETIME NOT NULL)";

cat.Create(cs);

using (OleDbConnection cnn = new OleDbConnection(cs))
{
OleDbCommand cmd = new OleDbCommand();
try
{
cmd.CommandText = strSQL;
cmd.CommandType = CommandType.Text;
cmd.Connection = cnn;
cnn.Open();
cmd.ExecuteNonQuery();
cnn.Close();
return true;
}
catch (Exception)
{
throw;
}
finally
{
cnn.Close();
cmd.Dispose();
}
}
}
catch (Exception)
{
throw;
}
finally
{
Marshal.FinalReleaseComObject(cat);
}
}

Points of Interess

2007 Office System Driver: Data Connectivity Component

http://bit.ly/ce9fHy

Fundamental Microsoft Jet SQL for Access 2000

http://bit.ly/dfPkBR

Posted by Joao Livio | with no comments

VSTO 2010 Runtime dubbed Install on Demand

Picture4_4

During development of the VSTO 2010 Runtime was added a feature, dubbed Install on Demand, to support VSTO customizations that target both .NET Framework 3.5 and .NET Framework 4 without enforcing installation of both frameworks prior to installation of VSTO 2010.

Install on Demand coupled with the VSTO 2010 Runtime shipping with Office 2010 simplifies many deployment scenarios. End users of Office 2010 customizations that target .Net Framework 3.5 will never need to manually install the VSTO 2010 Runtime nor know of its existence

Yu can read all about it in the Develop Office Business Applications using Visual Studio Blog at http://bit.ly/cRDAao 

GOOD READING :)

Compilation from: http://bit.ly/cRDAao 

Explore these links to find out more about developing solutions for Microsoft Office.

Documentation

If you are new to Microsoft Office development, and want to learn more about the possibilities offered by the Microsoft Office System to develop solutions, explore this set of helpful links to get you up to speed.

MSDN logo

MSDN Developer Centers

Visit the MSDN Developer Centers to access code samples, videos, community sites, documentation, and more.

Learn

Getting Started

Learn about the newest release of Microsoft Office and Microsoft SharePoint Products and Technologies.

Code

Downloads & Code

Find the latest Office code samples in the gallery or upload your own. Find open-source projects, start your own, or download software from the community.

Training

Training

Learn how to use Microsoft Office features in these hands-on labs, demos, and presentations.

Blogs

Blogs

Check out the latest posts from the Office developer community.

Forums

Forums & Newsgroups

Got questions? Talk to your peers, MVPs, and the Office product teams.

WebCasts

Videos & Webcasts

Get the inside scoop on what is happening with Office.

Channel9

Channel 9 Videos

Watch Office and SharePoint videos and connect with your peers.

Books

Office Bookstore

Want to buy a book? Read a sample chapter online? Visit our bookstore first.

Stay Connected

Keep connected with the latest happenings with Microsoft Office.

Chat

Provide Feedback

Provide feedback about Microsoft Office.

Most Recent Podcasts for Office Systems 2010 - 2007

Últimos Podcasts Office Systems 2010 e 2007

Managing for Accountability
Microsoft Office System
March 19, 2010
57

Tips and Tricks for Word 2007 and Office 2010
Microsoft Office Word
March 17, 2010
65

Tips and Tricks for Word 2007 and Office 2010
Microsoft Office Word
March 17, 2010
69

What's New in Visio 2010
Microsoft Office Visio
March 09, 2010
72

Project Risk Planning and Microsoft Office Project 2007
Microsoft Office Project
February 23, 2010
57

Tips and Tricks for Outlook 2007
Microsoft Office Outlook
February 17, 2010
59

Effective Delegation
Microsoft Office System
February 17, 2010
54

Tips and Tricks for Outlook 2007
Microsoft Office Outlook
February 17, 2010
62

Using Project 2007 to Manage Multiple Projects and Cross-Project Dependencies
Microsoft Office Project
January 26, 2010
56

Staffing, Methodology, and Governance for External-Facing SharePoint Sites
Microsoft Office SharePoint
January 20, 2010
62

Posted by Joao Livio | with no comments

HOT! Upcoming Office Systems Webcasts (April to June)

Microsoft Office System Webcast: Visio 2010 Business Process Modeling and Notation (Level 200)

Tuesday, April 13, 2010

8:00 A.M.–9:30 A.M. Pacific Time

Microsoft Office System Webcast: Tips and Tricks for Outlook 2007 and Office 2010 (Level 100)

Wednesday, April 14, 2010

8:00 A.M.–9:00 A.M. Pacific Time

Microsoft Office System Webcast: Tips and Tricks for Outlook 2007 and Office 2010 (Level 100)

Wednesday, April 14, 2010

11:00 A.M.–12:00 P.M. Pacific Time

Microsoft Office System Webcast: Balancing Meetings and Your Workload (Level 200)

Tuesday, April 20, 2010

11:00 A.M.–12:00 P.M. Pacific Time

Microsoft Office System Webcast: Microsoft Office Project 2010 - Planning (Level 200)

Tuesday, April 27, 2010

10:00 A.M.–11:00 A.M. Pacific Time

Microsoft Office System Webcast: Tips and Tricks for Excel 2007 and Office 2010 (Level 100)

Wednesday, May 12, 2010

8:00 A.M.–9:00 A.M. Pacific Time

Microsoft Office System Webcast: Tips and Tricks for Excel 2007 and Office 2010 (Level 100)

Wednesday, May 12, 2010

11:00 A.M.–12:00 P.M. Pacific Time

Microsoft Office System Webcast: Microsoft Office Project 2010 - Communicating (Level 200)

Tuesday, May 25, 2010

10:00 A.M.–11:00 A.M. Pacific Time

Microsoft Office System Webcast: Tips and Tricks for PowerPoint 2007 and Office 2010 (Level 100)

Wednesday, June 9, 2010

8:00 A.M.–9:00 A.M. Pacific Time

Microsoft Office System Webcast: Tips and Tricks for PowerPoint 2007 and Office 2010 (Level 100)

Wednesday, June 9, 2010

11:00 A.M.–12:00 P.M. Pacific Time

Microsoft Office System Webcast: Microsoft Office Project 2010 - Tracking (Level 200)

Tuesday, June 22, 2010

10:00 A.M.–11:00 A.M. Pacific Time

Posted by Joao Livio | with no comments

Visual Studio 2010 - VSTO (VB) Access 2010 Template

I was converting some projects, and i was stuck in a VSTO Add-In, so i built the VB Template for Microsoft Access 2010.

Work’s with Visual Studio 2010, if anyone want to change it to C# fell free to do it, if you can share it leave a comment, thanks.

Multi-threading in VSTO

I was facing some problems regarding multi-tasks in VSTO, so i came up with this.

f189506

The first problem was understand that all calls into the Office OM will be serialized so while one thread is calling into Office, the remaining threads would be blocked from doing so because Office object model is not thread safe, but if you are calling into a component that is thread-safe, then COM doesn't need to get in the way and concurrency is allowed. The issue that you need to understand is how much time your threads will spend being blocked and whether that will invalidate the performance gain you are hoping for.  If your tasks are truly self-contained (or call into Free Threaded components) then you won't blocked by COM if you run them on background threads.

 As Geoff Darst from the Microsoft VSTO Team explain:

“It sounds like you might benefit from reviewing the COM threading documentation which can be found here: http://windowssdk.msdn.microsoft.com/en-us/library/ms693344.aspx.  Hopefully, that will fill in any of the gaps in your reading of other threads.

It is possible to do multi-threading in VSTO solutions regardless of whether your threads interact with the Office OM.  However, in the latter case, you need to implement IMessageFilter (the COM version, not System.Windows.Forms version) and you need to understand that all calls into the Office OM will be serialized so while one thread is calling into Office, the remaining threads would be blocked from doing so.

All of this is because the Office object model isn't thread safe.  Since COM can't control the fact that a client might try to call a non-thread safe server with multiple threads, it does the next best thing which is to serialize the calls.  On the other hand, if you are calling into a component that is thread-safe, then COM doesn't need to get in the way and concurrency is allowed.

As I said, it is always possible to use multiple threads in VSTO.  The issue that you need to understand is how much time your threads will spend being blocked and whether that will invalidate the performance gain you are hoping for.  If your tasks are truly self-contained (or call into Free Threaded components) then you won't blocked by COM if you run them on background threads.” 

Geoff Darst, Microsoft VSTO Team, Source: VSTO Forum

 Readings

Processes, Threads, and Apartments

http://msdn.microsoft.com/en-us/library/ms693344(VS.85).aspx

Choosing the Threading Model

Single-Threaded Apartments

Multithreaded Apartments

Single-Threaded and Multithreaded Communication

In-Process Server Threading Issues

Accessing Interfaces Across Apartments

VSTO - Detect if Access Database is Open

How to know if a access database is open within VSTO

VB.NET

Private Shared _oAccess As Microsoft.Office.Interop.Access.Application
''' <summary>
'''
''' </summary>
''' <returns></returns>
''' <remarks></remarks>
Public Shared Function IsAccessDatabaseOpen() As Boolean
Try
_oAccess = CType(Marshal.GetActiveObject("Access.Application"), Microsoft.Office.Interop.Access.Application)
Select Case _oAccess.CurrentProject.Connection.ToString
Case Nothing
Return False
Case Else
Return True
End Select
Catch ex As Exception
Thrown;
Finally
Marshal.ReleaseComObject(_oAccess)
End Try
End Function
 
C#
 
Microsoft.Office.Interop.Access.Application _oAccess;


// '' <summary>
// ''
// '' </summary>
// '' <returns></returns>
// '' <remarks></remarks>
public static bool IsAccessDatabaseOpen() {
try {
_oAccess = ((Microsoft.Office.Interop.Access.Application)
(Marshal.GetActiveObject("Access.Application")));
switch (_oAccess.CurrentProject.Connection.ToString) {
case null:
return false;
break;
default:
return true;
break;
}
}
catch (Exception ex) {
Thrown;
}
finally {
Marshal.ReleaseComObject(_oAccess);
}
}



Posted by Joao Livio | with no comments

Simulating DAvg() equivalent to Microsoft Access

I was writing a ClassLibrary to COM Interop and this one came up. This was original whiten to use with JET (VBA and VB6)

C#

public object DAvg(string connectionString, string expression, string domain, string criteria)
{

var strSQL = "Select " + expression + " As ThisValue" +
" From " + domain +
" Where " + criteria;
using (var con = new OleDbConnection(connectionString))
{
using (var da = new OleDbDataAdapter(strSQL, con))
{
using (var dt = new DataTable())
{
da.Fill(dt);
int i;
double sum = 0;
for (i = 0; (i <= dt.Rows.Count -1); i++)
{
sum = Convert.ToDouble(dt.Rows[i].ItemArray[0].ToString()) + sum;
}
return sum / i;
}
}
}
}
 
VB.NET
 
Public Function DAvg(ByVal connectionString As String, ByVal expression As String, ByVal domain As String, ByVal criteria As String) As Object

Dim strSQL = "Select " + expression + " As ThisValue" + _
" From " + domain + _
" Where " + criteria
Using con = New OleDbConnection(connectionString)
Using da = New OleDbDataAdapter(strSQL, con)
Using dt = New DataTable()
da.Fill(dt)
Dim i As Integer
Dim sum As Double = 0
i = 0
While (i <= dt.Rows.Count - 1)
sum = Convert.ToDouble(dt.Rows(i).ItemArray(0).ToString()) + sum
i += 1
End While
Return sum / i
End Using
End Using
End Using
End Function


Posted by Joao Livio | with no comments
Filed under: , , ,
More Posts Next page »