Quantcast
Channel: Visual Studio Tools for Office (VSTO) forum
Viewing all 5157 articles
Browse latest View live

Error while adding a new sheet in VS designer in a VSTO Excel project

$
0
0

Hi All,

When I try to add a new sheet in my existing (VSTO Excel, VSTO 4.0 C# application with Office 2010) project from Visual Studio. It add successfully but when I compile it throws the below error:

“Partial declarations of 'NameSpace.Globals' have conflicting accessibility modifiers wsSheet1.Designer.cs”

I’ve read lots of articles about “Partial class and its accessibility modifier”, but not able to find its fix in that Designer.cs.

Due to this I’m not able to proceed with new sheet in the project.

Thanks a lot in advance.

Utshek Jain


Thanks Utshek Jain


Convert a Powerpoint into html by Microsoft Powerpoint Interop 2013

$
0
0

Can anyone suggest how to convert  a powerpoint 2013 into html using Microsoft Powerpoint Interop 2013.

How to capture quick click categories and right clicks in Outlook 2007

$
0
0

Hi -

I have been searching for several months for a solution to my problem. Essentially what I have is an add-in for Outlook 2007 that tracks changes for a customer service department and the user that made them. We have multiple reps working in several shared mailboxes. I've got everything working pretty smoothly by using a combination of the explorer.selectionChange and the mailitem.propertychange events.

However, the issue I have is when a user right clicks on the category column in the explorer to bring up the context menu and selects a category (same for tasks). Also when they use the quick click feature. I can't find an event for either one of these when the mailitem that is being changed isn't the currently selected one (since the selection doesn't change by a right click). A couple of things I've tried are:

application.itemcontextmenudisplay event - This only works for the context menu of the mailitem but it doesn't fire when the context menu for the categories column is brought up

Wrapping everything in folder.items to a class that contains a propertychange event - I've tried several methods using this with no real success, mainly because I need to monitor any changes that could happen to ALL items in a particular folder. Since exchange has a 150 mailitem limit at one time this will not work. This method works best by using the items in the explorer.selection but since the selection doesn't change for a right click its a moot point. 

Used XML in Outlook 2010 - this showed the most promise but for some reason the onAction parameter doesn't work for the Categories gallery (if I'm wrong on this please let me know!!). I even considered rebuilding the Categories context menu by making the default menu invisible and writing a script that creates my own gallery. I got the closest with this but the imageMso's for the Category colors are not available for some reason (Again please correct me if I'm wrong).

Ideally, I'd like a solution that would work for both 2007 and 2010 because most representatives still use Outlook 2007 and we haven't fully upgraded everyone. However, I'm willing to consider requiring the floor to upgrade to 2010 if necessary.

Please help!!

How to stop putting signature at the end of the body when a mail is being created from a template in outlook 2007?

$
0
0

hi,

I am working with an Outlook 2007 add-in in VS 2008. I have another windows application where the users have the option to create new emails selecting a predefined template (.oft). But when the user chooses this option to create email from an existing template, Outlook automatically appends the signature of that user at the end of the body.

How can I tell outlook from within my add-in OR while creating the email (from the other application) from the template not to put signature in the body?

Thanks,

-Jahedur Rahman

Excel VSTO Add-In: Cannot reactivate Excel after MessageBox.Show("Test");

$
0
0

Reproducable with Windows XP - ... and Excel 2007 - ...:

  1. I do open Excel and create two or more new workbooks
  2. I do show a modal dialog, let's say via "MessageBox.Show" I open "notepad" and maximize its window
  3. I try to reactivate one of the excel workbook windows via the windows taskbar
  4. I expect: Excel will come up with my modal MessageBox to appear on top
  5. The actual result is: Neither the MessageBox nor any of the Excel workbooks comes up, when you click a workbook item in the windows taskbar!

=> See more details and short code example here: http://stackoverflow.com/q/20688734/1413641


how to fetch some part of content from document

$
0
0

hi

i want to get some part of contents from existed document, and append these parts to some other document.


i have searched some threads which talking about split document to separate file, but i warry about the performance, in my business the source document will be very large. in this way the process will be load the whole document first , than get the parts of content ,and save to another file, than insert this file to final document.

is any other way can do this?

Is VSTO the same as "Microsoft Office Developer Tools"??

$
0
0

Is VSTO the same as "Microsoft Office Developer Tools"??

TIA

ps: If it matters, I am using Office 2007 and VS-2010

Visula studio 2010 Compatibility with Office 2013

$
0
0

Hi Team,

We are planning to upgrade to Microsoft Office 2013 SP1. Would Visual Studio 2010 be compatible with Microsoft Office 2013 Sp1(excel 2013) on Windows 7?

Thanks,

V


Vas


How to emulate a mouse-click by an Add-In?

$
0
0

This will be my first Add-In. Please bear with me.

The goal of my add-in application is to replicate a very tedious, repetitive work by a user. She tells me that she initiates her task by clicking in some sort of combo box or drop-down menu and typing several digits, followed by a click on the "Ok" button.

Question No. 1: What is the official name of that contraption and how is it coded into an Excel cell?

I gather than Add-Ins are coded using something called "Object Model"? I have seen about 4 lines of such code.

Is there a statement like this?

    
"ClickOnCell("F12");

TIA


I'm confused - C# is what I should be studying if I want to learn more about VSTO and developing for Office without using VBA?

$
0
0

I can't seem to find any books that actually go into detail on developing for Office apps using C# / Visual Studio over VBA.  If I find any mention of Office apps, there are very few pages of it.

Am I looking for the wrong thing?  .Net?

Sorry I'm very new to Office development and I need to look into an office app - I just don't know where to start with reading up on it.

Difference betwen "Microsoft.Office.Interop" and "Microsoft.Office.Tools"?

$
0
0

I have been scavenging all over the Internet, looking for usable VSTO code, for Excel development. In doing so, I have found a large degree of overlap between these two References:

Microsoft.Office.Interop

and

Microsoft.Office.Tools

Oftentimes, the ambiguity must be resolved:

using Excel = Microsoft.Office.Interop.Excel;

This duality is very annoying and the source of confusion, and non-working code.

I speculate that one of the assemblies is being phased out? If so: which is the "better" (newer) one?

TIA

How to code a copy paste?

$
0
0

Are there simple, tutorial VSTO samples posted anywhere?

Newbies need basic things like:

 - Iterate through a range.

 - Copy & paste

 - Open existent spreadsheet

 - Create a spreadsheet

 - Save a spreadsheet.

 - How to hide some rows (ie. emulating Filters).

TIA


How to fix this Error Massage "New cannot be used on an interface" In Sheet Designer vb --> Visual Studio 2010

$
0
0

hi  @ all

I have no idea how to fix it. Maybe someone could help me.

Declare Section:

<Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(2), _
     Global.System.Security.Permissions.PermissionSetAttribute(Global.System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
    Partial Public NotInheritable Class Tabelle2
        Inherits Microsoft.Office.Tools.Excel.WorksheetBase
        Friend  list1 As Microsoft.Office.Tools.Excel.ListObject

Section with Error message:

<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
         Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "10.0.0.0"), _
         Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
        Private Sub InitializeControls()

            Me.list1 = New Microsoft.Office.Tools.Excel.ListObject(Me.ItemProvider, Me.HostContext, "Sheet2:list1", Me, "list1")
        End Sub

I found out that ListObject command is not available but in the declare section command will be offered. The underline code line (cause error message. 

Why this? Which workaround I need?

Thanks for help

Boy88





Need help understanding how to make a VSTO excel add-in. The attached code says start-up and shutdown event cannot be found

$
0
0

I am missing something basic.  I created a Excel 2013 Add-in project in Visual Studio (VB module).  My code is posted below.  At first it compiled; but then I changed the project name and now it says start-up and shutdown even cannot be found. Also when it did compile, I could not load it to Excel.  It gave a run-time error.  Any help would be greatly appreciated.  This is my first attempt at making a VSTO add-in.  VB part of the code has no reported errors.  Thanks.

Raja

Imports Microsoft.VisualStudio.Tools.Applications
Public Class ThisAddIn
    Private Sub ThisAddIn_Startup() Handles Me.Startup
        System.Windows.Forms.MessageBox.Show("Add-in has successfully loaded")
        CFMList()
        

    End Sub

    Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown

    End Sub
    Public Sub CFMList()

        'Declaration
        '   PublicEnumerationXlThemeColor()
        '
        ' This macro makes a sorted CFM list from a IP11B exported Excel workbook
        '

        '
        ' Worksheets.Add(After:=Worksheets(1)).Name = "CFM_Map"

        ' Sheets.Add After:=Sheets(Sheets.Count)

        Dim excelapp As New Excel.Application
        Dim sht1 As Worksheet

        excelapp = CreateObject("Excel.Application")
        excelapp.Visible = True
        'book1 = excelapp.Workbooks.Add
        sht1 = Globals.CFMList.Application.ActiveWorkbook.Sheets("MAX UFBC (Cell Friction Metric)")
        excelapp.Visible = True
        sht1.Select()

        ' For i = 0 To caltip.GetUpperBound(0)
        'For j = 0 To caltip.GetUpperBound(1)
        'sht1.Cells(i + 2, j + 1).value = caltip(i, j)
        'Next
        'Next

        'Sheets("MAX UFBC (Cell Friction Metric)").Select()
        sht1.Cells("A50") = "Rod#"
        sht1.Cells("B50") = "GE-i"
        sht1.Cells("C50") = "GE-j"
        sht1.Cells("D50") = "PNPS-xx"
        sht1.Cells("E50") = "PNPS-yy"
        sht1.Cells("G50") = "CFM"
        sht1.Cells("F50") = "Site Rod"
        sht1.Cells("h50") = "Max Node"

        Dim Csize As Long


        sht1.Cells("K1") = "max i"
        sht1.Cells("L1") = "=MAX(R[5]C[-11]:R[5]C[42])"
        Csize = sht1.Cells("L1")

        Dim GNFi(Csize) As Long
        Dim GNFj(Csize) As Long
        Dim PNPSxx(Csize) As Long
        Dim PNPSyy(Csize) As Long
        Dim CFM(Csize, Csize) As Long
        Dim max_node(Csize, Csize) As Long
        Dim n As Long

        n = 0
        For i = 1 To Csize
            GNFi(i) = sht1.Cells(6, i + 1)
            PNPSxx(i) = 2 * GNFi(i)

            For j = 1 To Csize
                GNFj(j) = sht1.Cells(j + 6, 1)
                PNPSyy(j) = 2 * Csize + 1 - 2 * GNFj(j)
                CFM(i, j) = sht1.Cells(j + 6, i + 1)
                max_node(i, j) = sht1.Cells(j + 6, i + 1)
                If (CFM(i, j) <> 0) Then
                    n = n + 1
                    sht1.Cells(50 + n, 1) = n
                    sht1.Cells(50 + n, 2) = GNFi(i)
                    sht1.Cells(50 + n, 3) = GNFj(j)
                    sht1.Cells(50 + n, 4) = PNPSxx(i)
                    sht1.Cells(50 + n, 5) = PNPSyy(j)
                    sht1.Cells(50 + n, 6) = PNPSxx(i) & " " & PNPSyy(j)
                    sht1.Cells(50 + n, 7) = CFM(i, j)
                    sht1.Cells(50 + n, 8) = max_node(i, j)
                End If

            Next j
        Next i

        sht1.Range("B51").Select()
        sht1.Range("B51").End(Excel.XlDirection.xlDown).End(Excel.XlDirection.xlToRight).Select()


        Dim xlSortOnValues As Long
        Dim xlDescending As Long
        Dim xlSortNormal As Long
        xlSortOnValues = 0
        xlDescending = 1
        xlSortNormal = 0
        sht1.Sort.SortFields.Clear()
        sht1.Sort.SortFields.Add(Key:=sht1.Range("G51").End(Excel.XlDirection.xlDown), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal)


        With sht1.Sort
            .SetRange(sht1.Range("B50").End(Excel.XlDirection.xlDown))
            .Header = Excel.XlYesNoGuess.xlNo
            .MatchCase = False
            .Orientation = Excel.XlSortOrientation.xlSortRows
            .SortMethod = Excel.XlSortMethod.xlPinYin
            .Apply()
        End With
        Dim r1 As NamedRange

        r1 = sht1.Range("G51").Select()
        r1 = sht1.Range("G51").End(Excel.XlDirection.xlDown).Select()

        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlGreater, _
            Formula1:="=339.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 255
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlBetween, _
            Formula1:="=99.5", Formula2:="=159.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 65535
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlGreater, _
            Formula1:="=159.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Font
            .Color = -16383844
            .TintAndShade = 0
        End With
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 13551615
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False

        sht1.Range("F51").Select()
        r1 = sht1.Range("F51").End(Excel.XlDirection.xlDown).Select()
        r1.FormatConditions.Delete()
        r1 = sht1.Range("G51").End(Excel.XlDirection.xlDown).Select()
        sht1.Range("F51").Activate()
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlGreater, _
            Formula1:="=339.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 255
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False
        r1 = sht1.Range("G51").End(Excel.XlDirection.xlDown).Select()
        sht1.Range("F51").Activate()
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlBetween, _
            Formula1:="=99.5", Formula2:="=159.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 65535
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False

        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlGreater, _
            Formula1:="=159.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Font
            .Color = -16383844
            .TintAndShade = 0
        End With
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 13551615
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False


        r1 = sht1.Range("F51").End(Excel.XlDirection.xlDown).Select()
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlExpression, Formula1:= _
            "=IF(G51:G134>159.5,TRUE,FALSE)")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Font
            .Color = -16776961
            .TintAndShade = 0
        End With
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .ThemeColor = Excel.XlThemeColor.xlThemeColorAccent6
            .TintAndShade = 0.799981688894314
        End With
        r1.FormatConditions(1).StopIfTrue = False

        r1.FormatConditions.Delete()
        r1 = sht1.Range("G51").End(Excel.XlDirection.xlDown).Select()
        sht1.Range("F51").Activate()
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlGreater, _
            Formula1:="=339.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 255
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlBetween, _
            Formula1:="=99.5", Formula2:="=159.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 65535
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlCellValue, Operator:=Excel.XlFormatConditionOperator.xlGreater, _
            Formula1:="=159.5")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Font
            .Color = -16383844
            .TintAndShade = 0
        End With
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 13551615
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False
        r1 = sht1.Range("F51").End(Excel.XlDirection.xlDown).Select()

        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlExpression, Formula1:= _
            "=IF(G51:G134>159.5,TRUE,FALSE)")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Font
            .Color = -16776961
            .TintAndShade = 0
        End With
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .ThemeColor = Excel.XlThemeColor.xlThemeColorAccent6
            .TintAndShade = 0.799981688894314
        End With
        r1.FormatConditions(1).StopIfTrue = False
        r1.FormatConditions.Add(Type:=Excel.XlFormatConditionType.xlExpression, Formula1:= _
            "=IF(G51:G134>99.5,IF(G51:G134<159.5,TRUE,FALSE),FALSE)")
        r1.FormatConditions(r1.FormatConditions.Count).SetFirstPriority()
        With r1.FormatConditions(1).Interior
            .PatternColorIndex = Excel.XlColorIndex.xlColorIndexAutomatic
            .Color = 65535
            .TintAndShade = 0
        End With
        r1.FormatConditions(1).StopIfTrue = False

        r1 = sht1.Range("A50:H50").Select()
        With r1
            .HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter
            .VerticalAlignment = Excel.XlVAlign.xlVAlignBottom
            .WrapText = False
            .Orientation = 0
            .AddIndent = False
            .IndentLevel = 0
            .ShrinkToFit = False
            '     .ReadingOrder = xlContext
            .MergeCells = False
        End With
        With r1
            .HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter
            .VerticalAlignment = Excel.XlVAlign.xlVAlignBottom
            .WrapText = False
            .Orientation = 0
            .AddIndent = False
            .IndentLevel = 0
            .ShrinkToFit = False
            '   .ReadingOrder = xlContext
            .MergeCells = False
        End With
        r1.Font.Bold = True
        r1 = sht1.Range("A50").End(Excel.XlDirection.xlToRight).End(Excel.XlDirection.xlDown).Select()

        r1.Borders(Excel.XlBordersIndex.xlDiagonalDown).LineStyle = Excel.XlLineStyle.xlLineStyleNone
        r1.Borders(Excel.XlBordersIndex.xlDiagonalUp).LineStyle = Excel.XlLineStyle.xlLineStyleNone
        With r1.Borders(Excel.XlBordersIndex.xlEdgeLeft)
            .LineStyle = Excel.XlLineStyle.xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = Excel.XlBorderWeight.xlThin
        End With
        With r1.Borders(Excel.XlBordersIndex.xlEdgeTop)
            .LineStyle = Excel.XlLineStyle.xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = Excel.XlBorderWeight.xlThin
        End With
        With r1.Borders(Excel.XlBordersIndex.xlEdgeBottom)
            .LineStyle = Excel.XlLineStyle.xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = Excel.XlBorderWeight.xlThin
        End With
        With r1.Borders(Excel.XlBordersIndex.xlEdgeRight)
            .LineStyle = Excel.XlLineStyle.xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = Excel.XlBorderWeight.xlThin
        End With
        With r1.Borders(Excel.XlBordersIndex.xlInsideVertical)
            .LineStyle = Excel.XlLineStyle.xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = Excel.XlBorderWeight.xlThin
        End With
        With r1.Borders(Excel.XlBordersIndex.xlInsideHorizontal)
            .LineStyle = Excel.XlLineStyle.xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = Excel.XlBorderWeight.xlThin
        End With
        r1 = sht1.Range("A50").End(Excel.XlDirection.xlDown).End(Excel.XlDirection.xlToRight).Select

        sht1.PageSetup.PrintArea = sht1.Range("A50").End(Excel.XlDirection.xlDown).End(Excel.XlDirection.xlToRight).Select

        sht1.ExportAsFixedFormat(Type:=Excel.XlFixedFormatType.xlTypePDF, Filename:= _
            "make-CFM-list.pdf", Quality:=Excel.XlFixedFormatQuality.xlQualityStandard, _
            IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
            False)
        Globals.CFMList.Application.ActiveWorkbook.SaveAs()

    End Sub

End Class


Capture key press event in outlook

$
0
0

Hi,

I want to handle few shortcut keys in my outlook add-in application. For this I need to capture keyPress / keyDown / keyUp events. How can I do this?


VB.NET and VBA in Outlook

$
0
0

Hi everybody...

I am writing an add-in for Outlook and I am stuck within the communication between VB.NET and Outlooks' VBA.

My add-in needs to create a new module in the activeVBProject and write some code in it. I searched Google for an answer, but all I found was how to do this in excel.

I tried to do the same in Outlook

 Dim olapp As Object
                Dim olmodule As vbide.vbcomponent
                Dim olcode As String
                olapp = CreateObject("Outlook.Application")
                olapp.vbproject.vbcomponents.add(VBIDE.vbext_ComponentType.vbext_ct_StdModule)
                olcode = "test"
                olmodule.codemodule.addfromstring(olcode)

but outlook does not support the VBIDE.VBComponent.

Can anybody tell me if it is possible to do something?

thx in advance

Creating .msi installer for MS Word 2010 AddIn - Cannot add Add-In after installation

$
0
0

Hi all

I'm trying to create an .msi installer for my Word 2010 AddIn. First time I was using VSTO deployment but we cannot use an exe file for our company because if we use .exe we cannot install it over active directory. We would have to install it individually on every computer. To avoid this, we want to install it over active directory and with an msi file.

So I created an msi Installer using a video tutorial. This worked fine and if I installed it, it is in my installfolder (addin.dll, a config file and of course the references). But if I now open Word 2010 it isn't there. So I went to "Options > Add-Ins > COM-Add-Ins > Go to...". Then I clicked on "Add" and search for my .dll file to add. But if I want to add the file, I get an error:

"<Path to .dll file>.dll is not a valid Office-Add-In"

I'm really confused about this error and I get stuck on this.

So I hope you can tell me if it's possible to install and add/use a MS Word 2010 AddIn with an msi file. And I also hope you can tell me how I can get rid of this problem.

Thanks,
Roman

SharePoint Package designer error visual studio 2013

$
0
0

I am facing the following error when opening package designer on Visual Studio 2013, knowing that i am developing SharePoint 2013 solution, 

scenario, create solution, add modules and add files inside those modules, close Visual Studio, open it again. the error will appear, knowing that i already installed update 4 for Visual Studio 2013

Please help.

---------------------------
Microsoft Visual Studio
---------------------------
The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.



1) Sequence contains no matching element



Resulting in: An exception occurred while calling the 'OnImportsSatisfied' method on type 'Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel'.



Resulting in: Cannot activate part 'Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel'.

Element: Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel -->  Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel -->  AssemblyCatalog (Assembly="Microsoft.VisualStudio.SharePoint.Designers.Package, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")



Resulting in: Cannot get export 'Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel (ContractName="Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.IPackageViewModel")' from part 'Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel'.

Element: Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel (ContractName="Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.IPackageViewModel") -->  Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.PackageViewModel -->  AssemblyCatalog (Assembly="Microsoft.VisualStudio.SharePoint.Designers.Package, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")



Resulting in: Cannot set import 'Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider.ViewModel (ContractName="Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.IPackageViewModel")' on part 'Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider'.

Element: Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider.ViewModel (ContractName="Microsoft.VisualStudio.SharePoint.Designers.Package.ViewModels.IPackageViewModel") -->  Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider -->  AssemblyCatalog (Assembly="Microsoft.VisualStudio.SharePoint.Designers.Package, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")



Resulting in: Cannot get export 'Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider (ContractName="Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.IViewProvider")' from part 'Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider'.

Element: Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider (ContractName="Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.IViewProvider") -->  Microsoft.VisualStudio.SharePoint.Designers.Package.ViewProviders.PackageDesignViewProvider -->  AssemblyCatalog (Assembly="Microsoft.VisualStudio.SharePoint.Designers.Package, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")



Resulting in: An exception occurred while calling the 'OnImportsSatisfied' method on type 'Microsoft.VisualStudio.SharePoint.Designers.Package.Hosts.DslHost`1[[Microsoft.VisualStudio.SharePoint.Designers.Models.Packages.Package, Microsoft.VisualStudio.SharePoint.Designers.Models.Packages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]]'.



Resulting in: Cannot activate part 'Microsoft.VisualStudio.SharePoint.Designers.Package.Hosts.DslHost(Microsoft.VisualStudio.SharePoint.Designers.Models.Packages.Package)'.

Element: Microsoft.VisualStudio.SharePoint.Designers.Package.Hosts.DslHost(Microsoft.VisualStudio.SharePoint.Designers.Models.Packages.Package) -->  Microsoft.VisualStudio.SharePoint.Designers.Package.Hosts.DslHost(Microsoft.VisualStudio.SharePoint.Designers.Models.Packages.Package)


---------------------------
OK   
---------------------------


Does VSTO have access to the Filter check marks?

$
0
0

Can we programmatically retrieve and set the check marks in the screenshot????

TIA

Office 2013 idMso Save As task

$
0
0

I would like to add custom items to the "Computer" task in the Save As tab (under the browse button for instance).

I've tried a few different id's for the task but nothing has worked for me (ButtonTaskDynamicServiceProvider, ButtonTaskRecentDocuments, FileTypeChange, ButtonTaskSaveDocument, SaveToComputerTask).

Is there a way to add custom controls to this group?

Viewing all 5157 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>