Tagged Questions
1
vote
1answer
20 views
Call AnkhSVN commands in C#
Is there a way that I can call the same commands that Ankh SVN uses, within C# code?
For example, can I call the same functionality that adds a solution to a subversion from code?
I am writing ...
0
votes
1answer
26 views
Defining Items Based on Text File (C#)
I'm setting up a list of items that looks something like this.
List<BankInfo> all_branches = new List<BankInfo>();
Equipment.set_slot = "Mail";
all_branches.Add(new BankInfo
{
name = ...
0
votes
0answers
23 views
Executing and Excel Macro with NetOffice in .NET 4.5 using C#
I have some code that seems to execute fine up until this point:
excelApp.Run(myProps.Macro);
It creates the excel instance fine, and opens the correct file path, but when it attempts to execute ...
2
votes
2answers
62 views
Visual Studio 2012 - How to automate open close curly brace?
In Visual Studio 2012 I created a macro to create an open curly brace, create a new line, create a new line, create closing brace and move cursor one line up followed by a TAB.
That macro was ...
1
vote
0answers
73 views
Automate the fetching of e-mail(Gmail) body to an Excel file
Is it possible to automate the fetching of part of the e-mail body from my Gmail inbox to an Excel file? I want to get the data from my inbox which is in a table form to an Excel file. I tried to run ...
0
votes
1answer
51 views
Remove excel document action pane before saving excel workbook
I wish to clear document action pane controls before workbook shutdown. So that next time when I open that workbook action pane will not there. Basically I wish to detach action pane before workbook ...
0
votes
0answers
57 views
Remove old macro and Create a new macro in visio file programmatically (C#)
Hi Requirement is like this
1. Remove existing macro in the visio document.
2. Add new macro in that document.
string vdwFileName = @"C:\VisioHeaderXml\HeaderOnly.vdx";
string ...
0
votes
0answers
38 views
Running a Visual Studio macro from within a Unit Test
Is it possible to trigger a macro from within a unit test and get back it's returned value? The macro checks the integrity of certain solution files accessible from the DTE. Using the DTE from within ...
0
votes
1answer
100 views
C# Add-in vs VBA Macro for Excel functionality
We would like to give users of our system the opportunity to drag some of the data from a database into Excel. (Only reading data, no chance of writing any data back to the DB). The users do not have ...
0
votes
1answer
159 views
Fetch data from a Website into an Excel file with the hyperlinks in it
When I fetch data from a webpage to an Excel file using Macro it saves the data in the Excel file as it is supposed to be. My requirement is that it should save the data in the Excel with the ...
0
votes
1answer
119 views
no overload for method 'Open'/'Run' takes '1' arguments
I met this problem as title showed when I editing script task in C # in SSIS, I tried several solutions found online, but don't work. can you find out why?
using Microsoft.VisualBasic;using System;
...
1
vote
1answer
80 views
C# interfaces and macro constant alternatives
I'm creating a RESTful service using a C# WCF project and have a question about interfaces and macro constant alternatives.
I have a bunch of WebGet decorations which look like this (highly ...
0
votes
1answer
84 views
How to write VBA Code to add Digital Signature to protect VBAProject?
I have searched the MSDN, it only gives an example how to add digital signature to protect the entire workbook:
ActiveWorkbook.Signatures.AddNonVisibleSignature ...
1
vote
0answers
19 views
Am I able to make an addin that includes a set of macros that it will use?
Before I talk about what I am trying to get done, here are all my details on what I have done:
I have made a Macro Project named "XSMacros"
Here is what I'd like to do:
I want to make a VS Add-In have ...
0
votes
0answers
88 views
C# Run macro from another document on a network drive
I ran into a problem. I want to open a specific document (sti + listBox1.SelectedItem which returns the path and this works), then I want to run a macro from my L:\ - c# requires \\ in the path to ...
-1
votes
2answers
107 views
How can you run code stored on a string variable on C#? [duplicate]
I'm kind of new with C#. I was just wondering if there's a way to run code stored on a string var, for example:
string var = (int num = num1 * num2).ToString();
I read in another question it's ...
0
votes
1answer
47 views
Macro- Execute .exe after Post-Built Event
I want to write Post-build event in visual studio 2012. and I dont know how to write Macros to execute post built events. My simple requirement is, i just want to run an .exe file which is placed in a ...
1
vote
0answers
38 views
Is This Possible through an Outlook Addin
I need to create an Outlook(2010) Addin which does the following things:
-If an email is Dragged and dropped into Windows explorer (not within Outlook Folders) it
Changes the File Name to the ...
0
votes
0answers
39 views
Get local variables with VS macro/addin
I'm trying to do an automatic refactoring to rename variables according to a defined name style.
I found this macro: Resharper or CodeRush - global rename which was a pretty good point to start at.
...
2
votes
2answers
95 views
Scheduling to run a macro on every hour
Is there anyway to schedule a macro in Umbraco or a .ascx file to run every hour?
thanks
6
votes
4answers
97 views
C# implement similar properties within a class using a “template”
I've been wondering for a time now - in c# is there a way to define a "template" for several properties within a class. Here is what I mean:
Let's assume I have the following class
class MyCLass
...
2
votes
1answer
178 views
Get macro command names for menu items in Word
I'm developing an addon for MS Word 2010 using VSTO. The Word has a "Customize keyboard" dialog:
"Commands" list contains built-in macro commands each assigned to some menu or action. They can be ...
0
votes
3answers
588 views
How to run an excel macro from a Windows Service
I want to run an excel macro from my Windows Service. The Service is using a fileSystemWatcher to monitor a directory for an xml file to be added. Once a file is added the content of the xml file is ...
0
votes
0answers
227 views
Problems in using Excel Sheet contains functions (Macro) in C# code?
I have an excel file that contains some methods written in VB I think. I want to know any way makes me use these methods in C# code. I tried to make a connection with the file using ...
0
votes
1answer
145 views
How can i delete Macros from a single file from a Excel Sheet using C#?
Scope:
Me and my team are developing an Excel Report for our costumer, using VBA. There are Functions and Macros in this .xlms file that i don't want to make avaible for the costumer.
We've managed ...
0
votes
1answer
80 views
How to use Excel Sheet contains functions in C# code?
I have an excel file that contains some methods written in VB I think.
I want to know any way makes me use these methods in C# code.
I tried to make a connection with the file using ...
7
votes
2answers
326 views
Checking whether focus is set to excel cell
I am working on VSTO Project. I need to detect the input focus in Excel vsto project.
I want to check whether focus is on excel cell or it is on other excel component like find dialog, document ...
1
vote
2answers
85 views
How do i change a date string from my left/right arrows, in Excel?
In Excel 2010, I have a date "01-01-2012" and a left and right arrow.
I need to apply a macro or something else so the days in the date will de-/in -crease accordingly. How can this be done?
...
2
votes
2answers
756 views
Add excel macro button using c#
I have a question about creating excel button and adding macro function on it. I have created a button and module code but don't know how to make relation between them. Can anyone show me how?
my ...
0
votes
1answer
319 views
Retrieve data from Mysql to excel macro, Asp.net c#
I have no idea about excel macro. I need to get the data from MySQL and display it in excel. Can i get any links or code examples for this.
0
votes
0answers
128 views
C# Microsoft Project macro example code for adding subproject
I cannot find any example code for adding sub-projects to a Microsoft Project file. I assume its just a variation on adding a standard task, but google searches aren't really helping me.
Can anyone ...
0
votes
1answer
37 views
Create Template to add text to document
I have one template which have macros. Macros will add some text to document when document will open.
when I attched this template to any document, macros of the template also work for that document.
...
0
votes
0answers
146 views
Better Auto Typer than SendKeys? [closed]
I'm working on making a macro program, and part of that is autotyping. I know about sendkeys[], and it just drives me insane. I was wondering if there was a better system of doing an auto-typing than ...
1
vote
2answers
343 views
Create a macro for Microsoft Access via Interop
Is it possible to create a new macro using C# using the Interop library in Microsoft Access in a similar fashion as Word, Excel, or PowerPoint? In the other applications, you have access to ...
0
votes
1answer
89 views
How to convert an old form class with embedded designer code to separate partial classes?
I saw this thread but the manual way takes forever and the macro is good but every time I run it all my event handlers get erased by Visual Studio when it parses the designer file. Also the macro is a ...
2
votes
2answers
79 views
Regex.Match not working for finding string contained in other text C#
I am using the following C# Regex call to find all instances of some macros that are placed in a text file:
MatchCollection matches = Regex.Matches(txt, @"/{macro:(.*?)}/");
but it is returning no ...
0
votes
0answers
107 views
Code along side macro recorder
Okay to start off if you figure this out I'll love you forever. I am having a problem with a macro recorder which is managed by my own C# program. It should be running in thinkorswim without any ...
0
votes
0answers
186 views
Lost macros after mail merge (MS Word)
I've got a few Word templates containing macros, that I use customize with data via mail merge.
This is done through the microsoft.office.interop.word namespace in C#.
using Word = ...
0
votes
0answers
122 views
Not killing Easy Macro Recorder
Here I have a macro situation I'm dealing with in C#. Basically, I need to sequentially call a group of macros one at a time. The macros work when I'm testing it, but when its executed by a timer ...
0
votes
1answer
465 views
passing collection dictionary data from c# to macro
Please help.
I want to passing the collection data dictionary from C# code into excel macros.
The problem that i am facing now is an error during passing dictionary into macros.
Here is a simple ...
0
votes
1answer
250 views
Enabling Macros in Excel using GemBox 3.1 API
Well recently having a problem with GemBox.SpreadSheet 3.1. Right now the program will write an excel file, but when opening the file it will attempt to open the file saying "Excel found unreadable ...
0
votes
1answer
132 views
best “macro way” to repeat C# lines
In a C# program, I have an error check that gets repeated a lot:
try
{
File.Move(searchfolder + question1 +"_"+ filestring +".txt",
searchfolder + question1 +".txt");
}
catch ...
0
votes
1answer
142 views
for loop not counting past 2 columns - even though there is data in the 3rd column in excel worksheet
string workbookPath = filePath;
Excel.Application xlApp;
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;
Excel.Range range;
int rCnt = 0;
int cCnt = 0;
xlApp = new Excel.Application();
...
0
votes
1answer
257 views
Attaching to Specific Instances of the IDE
when I do:
// Get an instance of the currently running Visual Studio IDE.
EnvDTE80.DTE2 dte2;
dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.
GetActiveObject("VisualStudio.DTE.10.0");
...
0
votes
1answer
95 views
How to mimic any particular desktop app commands in c#?
Sorry for the noob question, I just want some pointers on what I need to learn to be able to achieve such tasks.
I want to know what skill-set and tools I will need to automate control any particular ...
1
vote
2answers
147 views
is it possible to use C# to write functionality within an excel workbook
I have an excel workbook which needs to query data from an HTTP server. Query directly from a remote database isn't an option.
From what I know I can use VB macros to contact the HTTP server and ...
3
votes
1answer
696 views
Create an Excel Macro and Macro-button programmatically from C#
I'm 2-weeks young C# programmer in the middle of simple method, that saves my DataGridView into an excel document (1 sheet only) and also adds a macro with asigned macro-button, which looks like this ...
0
votes
0answers
243 views
Excel Macro after SAP Macro
So, I have an excel macro I need to run after a SAP macro is finished. The SAP macro works fine without the inclusion of the Excel macro code. I'm not sure if it is how the sub routines are called ...
0
votes
1answer
580 views
Programmatic Execution Excel Macro on Remote Machine from a website
I tried searching everywhere for a solution on this issue but found nothing. To give you an idea what I want to achieve here is the scenario.
I have a website where users generate and Excel report ...
0
votes
2answers
262 views
sharing mouse click and key press events through windows (or handles)
I have 3, and sometimes more duplicates of an executable, and what I would like to do is to reduce workforce by sharing mouse click and key press events through all applications, with C#.
I am able ...