macros

using macro to send reports via email with gridline borders between records

I do not knw VBA and would like to know if I can, with my limited knowledge, use the send-object command (or another command)to email Access reports, with gridline borders in between the fields in my output. I currently have the macro email format set to html. ...

macro to email Accces reports not as an attachment

I dont know VBA. Is there a way for me have the macro to send the email where the report would be in the body of the email and not as an attachment? I currently use the "send-object" command and send it in html format , Please advse. thank you very much ...

problem with vba macros code not equal to checking in decimal values

Hi friends, In Macros coding, i am checking the not equal to condition. Values are in decimal or integer, Now i compare the two values in decimal values but not get the proper result. Please guide me what is the thing should be added for getting corrected result? My code is : If fld4 <> fldval Then MsgBox "....." End If But ...

Doubt about compile time code generation

I have a requirement something like void doSomeThing(int x) { ..... } void fun() { #ifdef XXXX_1_YYYY doSomeThing(XXXX_1_YYYY); #endif //XXXX_1_YYYY #ifdef XXXX_2_YYYY doSomeThing(XXXX_2_YYYY); #endif //XXXX_2_YYYY #ifdef XXXX_3_YYYY doSomeThing(XXXX_3_YYYY); #endif //XXXX_3_YYYY #ifdef XXXX_4_YYYY doSomeThing(XXXX_4_YYYY)...

How can I automatically highlight and extract colored text in MS Word?

I have a bunch of documents that need to be edited. The authors use blue text in some parts of the documents to indicate that those words need to be linked. Thank you cornelius for the highlight text code: Sub HighlightNotBlack() Dim char As Range For Each char In ActiveDocument.Characters If char.Font.Color <> wdColorAutomatic An...

Excel: Recreating a Sheet with a Macro?

I'm looking for a simple way to recreate a relatively complex Excel sheet with a macro, inculding cell values, formulas, formatting, and cell size. Basically, I have an Excel sheet and I need the VB code that would create the sheet. I.e. somewhat like using the macro recorder, but without having to do all the steps in sequence. Any ide...

Extending Visual Studio

How can I extend Visual Studio or create a macro that allows me to generate a local resource for all pages automatically? I have about 500 pages and UserControls, and it's difficult to generate resources for every page individually ...

How to invoke built-in commands from Visual Studio macro?

From a Visual Studio macro, how do I (programmatically) invoke one of the built-in commands (say, File.OpenFile)? Thanks. ...

is there a way to check who has opened the macro?

i have an XLAM macro that runs as an add in. can i write a script in any language to identify the user (IP address or name of computer) who is currently using the macro?? ...

Possiblity to have custom user interface controls in VBA macro

I want to have custom user interface controls like accordian in my VBA macro in power point. By the way I'm using MS office 2003 version and is there any possible way to do this without implementing these things from scratch? ...

Macros: What's the benefit?

Paul Graham writes: For example, types seem to be an inexhaustible source of research papers, despite the fact that static typing seems to preclude true macros-- without which, in my opinion, no language is worth using. What's the big deal with macros? I haven't spent a whole lot of time with them, but from the legacy C/C...

How to define macro for C project in autotools?

How do I define macros on a per-project, or per file level in a C project using autotools? Presently I have this: mount_cpfs_CPPFLAGS = -DFUSE_USE_VERSION=28, but I'm not sure that this is the "portable" way to define a C macro. ...

Pythonic way to intercept calls to a function?

For testing things that query the environment (e.g., os.getenv, sys.version, etc.), it's often more convenient to make the queries lie than to actually fake up the environment. Here's a context manager that does this for one os.getenv call at a time: from __future__ import with_statement from contextlib import contextmanager import os ...

Macro definitions for headers, where to put them?

When defining macros that headers rely on, such as _FILE_OFFSET_BITS, FUSE_USE_VERSION, _GNU_SOURCE among others, where is the best place to put them? Some possibilities I've considered include At the top of the any source files that rely on definitions exposed by headers included in that file Immediately before the include for the re...

vba: how do i open workbook programmatically as read-only?

this is how i can open an excel file in vbA: Workbooks.Open(file-path) is there a way to specify that it should be open as read-only? the files im opening have a password on them and i always get the dialog that it can only be open as read only. ...

Macros for apps run in Wine on Mac OS?

At work I use a Mac Pro for front-end dev. I run different versions of IE in Wine to have a fully integrated testing and development environment. I am now working on a side project to do automated testing across all of our supported browsers. I have checked out projects like Selenium, but none of them seem to quite meet my needs so I am ...

How to implement "record macro" like that in Microsoft Excel?

How to implement "record macro" like that in Microsoft Excel? PS: any language/platform. I just want an idea of how to do that. as far as i know, i can embed a script interpreter(maybe javascript) and make c++ object visible to scripts, just DOM in web browser. My question is that how to record user actions and then generated javascript ...

Visual Studio 2005: Ran Macro, now Solution is Terribly Slow... solutions?

I have a Wrap Append macro that basically wraps SQL in a .Append tag: Public Module WrapAppend Sub SurroundWithAppendTag() Dim lines = DTE.ActiveDocument.Selection.Text.Replace(vbCrLf, vbLf).Split(vbLf) For Each line As String In lines DTE.ActiveDocument.Selection.Text = ".Append(""" + line + """)" ...

excel: how do i sort within a cell?

i have a string separated by commas, is it possible to use an excel formula to sort within the values within the cell? ...

Can you capitalize a pasted token in a macro?

In a C macro, is it possible to capitalize a pasted-in token? For example, I currently have the following macro: #define TEST(name, keyword) \ test_##name: TEST_##keyword##_KEYWORD I would invoke this as follows: TEST(test1, TEST1) which would yield the following: test_test1: TEST_TEST1_KEYWORD Now, instead of h...