Search Results

Search found 1647 results on 66 pages for 'powerpoint vba'.

Page 17/66 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Ensuring the contacts in a Distribution List are displayed with both name and email address

    - by hawbsl
    How can I ensure the contacts I add to an Outlook distribution list are displayed with both name and email address? These contacts may not exist in any other address book, just the distribution list. Currently they show up just as an email address (in both columns). Here's roughly the VBA we're using: Do Until RS.EOF //here's where we want to inject RS!FirstName, RS!Surname etc objRecipients.Add RS!Email objRecipients.Resolve RS.MoveNext Loop Set objDistList = contactsFolder.Items.Add("IPM.DistList") objDistList.DLName = "Whatever" objDistList.AddMembers objRecipients objDistList.Save etc

    Read the article

  • Call Single StrConn from Multiple Pages

    - by Daniel
    I have a ocnnection to SQL Server set up in my vba code. The format is: strConn = "ODBC;Driver=SQL;Server=SQL1;Database=DB1;Uid=1;Pwd=1" I have this in 4 sheets, but there will be times when I will want to change it to call from SQL2 or SQL3, and instead of changing the code on each sheet 4 times, I want to change it only once. Is there a way to set up that line to run by calling it from somewhere else or by passing in a string into the ""?

    Read the article

  • New Office VBA site launch on MSDN

    MSDN now features a special site (also accessible via www.iheartmacros.com) dedicated to Microsoft Office VBA - an important part of the Office 2010 value.   The site presents a clear path for technically savvy users to begin learning how to customize the Office applications to meet their needs. This new MSDN site highlights content for: What you can do with VBA How to get started Key blogs VBA tips & tricks Access to a new interactive training tool, the Office Developer Atlas. In addition...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • VBA WinHTTPRequest and submitting forms

    - by Hazerider
    Hi. I spent all day yesterday trying to figure out how to submit a form using WinHTTPRequest. I can do it pretty easily with an InternetExplorer object, but the problem is that I need to save a PDF file that gets returned, and I am not sure how to do this with the IE object. Here is the relevant HTML code snippet: <div class="loginHome-left"> <fieldset> <h3>Log in Using</h3> <form> <label for="standardLogin" accesskey="s"> <input name="useLogin" id="standardLogin" value="standard" type="radio" checked="true">Standard Login</label> &nbsp; <label for="rsaSecurID" accesskey="r"> <input name="useLogin" value="rsaSecur" type="radio" id="rsaSecurID" onclick="redirectLogin('ct_logon_securid');return false;">RSA SecurID</label> &nbsp; <label for="employeeNTXP" accesskey="e"> <input name="useLogin" id="employeeNTXP" value="employee" type="radio" onclick="redirectLogin('ct_logon_external_nt');return false; "> Employee Windows Login<br></label> </form> <br> <div class="error">Error: ...</div><br> <form onSubmit="if(validate(this)) {formSubmit();} return false;" name="passwdForm" method="post" action="/UAB/ct_logon"> <input value="custom" name="pageId" type="hidden"> <input value="custom" name="auth_mode" type="hidden"> <input value="/UAB/ct_logon" name="ct_orig_uri" type="hidden"> <INPUT VALUE="" NAME="orig_url" TYPE="hidden"> <input value="" name="lpSp" type="hidden"> <label for="user"> <strong>Username</strong> </label> <input autocomplete="off" name="user" type="text" value="" class="txtFld" onkeypress="return handleEnter(this, event);"> <br> <label for="EnterPassword"> <strong>Password</strong>&nbsp;&nbsp;(<a tabindex="-1" href="/UAB/BCResetWithSecrets">Forgot Your Password?</a>) </label> <input autocomplete="off" name="password" type="password" class="txtFld" onkeypress="return handleEnter(this, event);"> <INPUT id="rememberLogin" name="lpCookie" type="checkbox"> <label for="rememberLogin">Remember My Login Information</label><br> </form> <div class="right"> <br> <input type="image" src="/BC_S/images/bclogin/btn_login.gif" name="" value="Submit" onClick="if(validate(document.forms['passwdForm'])){formSubmit();}return false;"> </div> <div class="clearfix"></div> </fieldset> </div> In order to log in through InternetExplorer, I do the following: Sub TestLogin() Dim ie As InternetExplorer, doc As HTMLDocument, form As HTMLFormElement, inp As Variant Set ie = New InternetExplorer ie.Visible = True ie.navigate "https://URL of the login page" Do Until ie.readyState = READYSTATE_COMPLETE Loop Set doc = ie.document For Each form In doc.forms If InStr(form.innerText, "Password") <> 0 Then form.elements("user").Value = "my_name" form.elements("password").Value = "my_password" Exit For Else End If Next 'This is the unnamed input with an image that is used to submit the form' doc.all(78).Click ie.navigate "https://url of the PDF" Do Until ie.readyState = READYSTATE_COMPLETE Loop Dim filename As String, filenum As Integer filename = "somefile.pdf" filenum = FreeFile Open filename For Binary Access Write As #filenum Write #filenum, doc.DocumentElement.innerText Close #filenum ie.Quit Debug.Print Set ie = Nothing End Sub What I really would like to do is something along the lines of the following: Sub TestLogin3() Dim whr As New WinHttpRequest, postData As String whr.Open "POST", "https://live.barcap.com/UAB/ct_logon", False whr.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" whr.setRequestHeader "Connection", "Keep-Alive" whr.Send whr.WaitForResponse postData = "user=paschom1&password=change01" 'Or the following?' postData = "user=paschom1&password=change01&orig_url=&pageId=custom&auth_mode=custom&ct_orig_uri=/BC/dispatcher&lpSp=&lpCookie=off" whr.Send postData whr.WaitForResponse Debug.Print whr.responseText End Sub It just refuses to work though. Not sure if I need to use more setRequestHeader with Content-Form or something similar, and if I do, not sure what exactly I am supposed to pass it. If anyone has any advice regarding this, it would be hugely appreciated. I could probably use a perl module to do it, but I would rather keep it all in VBA if possible. Thanks, Marc.

    Read the article

  • Naming PowerPoint Components With A VSTO Add-In

    - by Tim Murphy
    Note: Cross posted from Coding The Document. Permalink Sometimes in order to work with Open XML we need a little help from other tools.  In this post I am going to describe  a fairly simple solution for marking up PowerPoint presentations so that they can be used as templates and processed using the Open XML SDK. Add-ins are tools which it can be hard to find information on.  I am going to up the obscurity by adding a Ribbon button.  For my example I am using Visual Studio 2008 and creating a PowerPoint 2007 Add-in project.  To that add a Ribbon Visual Designer.  The new ribbon by default will show up on the Add-in tab. Add a button to the ribbon.  Also add a WinForm to collect a new name for the object selected.  Make sure to set the OK button’s DialogResult to OK. In the ribbon button click event add the following code. ObjectNameForm dialog = new ObjectNameForm(); Selection selection = Globals.ThisAddIn.Application.ActiveWindow.Selection;   dialog.objectName = selection.ShapeRange.Name;   if (dialog.ShowDialog() == DialogResult.OK) { selection.ShapeRange.Name = dialog.objectName; } This code will first read the current Name attribute of the Shape object.  If the user clicks OK on the dialog it save the string value back to the same place. Once it is done you can retrieve identify the control through Open XML via the NonVisualDisplayProperties objects.  The only problem is that this object is a child of several different classes.  This means that there isn’t just one way to retrieve the value.  Below are a couple of pieces of code to identify the container that you have named. The first example is if you are naming placeholders in a layout slide. foreach(var slideMasterPart in slideMasterParts) { var layoutParts = slideMasterPart.SlideLayoutParts; foreach(SlideLayoutPart slideLayoutPart in layoutParts) { foreach (assmPresentation.Shape shape in slideLayoutPart.SlideLayout.CommonSlideData.ShapeTree.Descendants<assmPresentation.Shape>()) { var slideMasterProperties = from p in shape.Descendants<assmPresentation.NonVisualDrawingProperties>() where p.Name == TokenText.Text select p;   if (slideMasterProperties.Count() > 0) tokenFound = true; } } } The second example allows you to find charts that you have named with the add-in. foreach(var slidePart in slideParts) { foreach(assmPresentation.Shape slideShape in slidePart.Slide.CommonSlideData.ShapeTree.Descendants<assmPresentation.Shape>()) { var slideProperties = from g in slidePart.Slide.Descendants<GraphicFrame>() where g.NonVisualGraphicFrameProperties.NonVisualDrawingProperties.Name == TokenText.Text select g;   if(slideProperties.Count() > 0) { tokenFound = true; } } } Together the combination of Open XML and VSTO add-ins make a powerful combination in creating a process for maintaining a template and generating documents from the template.

    Read the article

  • How should I embed/include Enterprise Architect UML diagrams in MS PowerPoint 2007?

    - by bn
    Setup I am using Sparx Systems Enterprise Architect Professional edition 7.5: http://www.sparxsystems.com.au/ and MS PowerPoint. Problem I have various audiences for presentations requiring display in MS PowerPoint -- ranging from managers to developers, whose depth of technical knowledge and requirements for knowledge varies. Question I have tried various settings for fonts, colors, and so on, but displaying a diagram with any level of detail (even simple class diagrams). These diagrams are very difficult to fit into a PowerPoint slide and render well when using a projector or a Live Meeting. Am I on the wrong path here, or is there a better/correct way to accomplish this? Thank you for the help, -bn

    Read the article

  • Center Pictures and Other Objects in Office 2007 & 2010

    - by Matthew Guay
    Sometimes it can be difficult to center a picture in a document just by dragging it dragging it around. Today we show you how to center pictures, images, and other objects perfectly in Word and PowerPoint. Note: For this tutorial we’re using Office 2010, but the steps are nearly identical in 2007. Centering a Picture in Word First let’s insert a picture into our document.  Click the Insert tab, and then click Picture. Once you select the picture you want, it will be added to your document.  Usually, pictures are added wherever your curser was in the document, so in a blank document it will be added at the top left. Also notice Picture Tools show up in the Ribbon after inserting an image. Note: The following menu items are available in Picture Tools Format tab which is displayed when you select the object or image you’re working with. How do we align the picture just like we want?  Click Position to get some quick placement options, including centered in the middle of the document or on the top.    However, for more advanced placement, we can use the Align tool.  If Word isn’t maximized, you may only see the icon without the “Align” label. Notice the tools were grayed out in the menu by default.  To be able to change the Alignment, we need to first change the text wrap settings. Click the Wrap Text button, and any option other than “In Line with Text”.  Your choice will depend on the document you’re writing, just choose the option that works best in the document.   Now, select the Align tools again.  You can now position your image precisely with these options. Align Center will position your picture in the center of the page widthwise. Align Middle will put the picture in the middle of the page height-wise. This works the same with textboxes.  Simply click the Align button in the Format tab, and you can center it in the page. And if you’d like to align several objects together, simply select them all, click Group, and then select Group from the menu.   Now, in the align tools, you can center the whole group on your page for a heading, or whatever you want to use the pictures for. These steps also work the same with Office 2007. Center objects in PowerPoint This works similar in PowerPoint, except that pictures are automatically set for square wrapping automatically, so you don’t have to change anything.  Simply insert the picture or other object of your choice, click Align, and choose the option you want. Additionally, if one object is already aligned like you want, drag another object near it and you will see a Smart Guide to help you align or center the second object with the first.  This only works with shapes in PowerPoint 2010 beta, but will work with pictures, textboxes, and media in the final release this summer. Conclusion These are good methods for centering images and objects in Word and PowerPoint.  From designing perfect headers to emphasizing your message in a PowerPoint presentation, this is something we’ve found useful and hope you will too. Since we’re talking about Office here, it’s worth mentioning that Microsoft has announced the Technology Guarantee Program for Office 2010. Essentially what this means is, if you purchase a version of Office 2007 between March 5th and September 30th of this year, when Office 2010 is released you’ll be able to upgrade to it for free! Similar Articles Productive Geek Tips Add or Remove Apps from the Microsoft Office 2007 or 2010 SuiteAdd More Functions To Office 2007 By Installing Add-InsCustomize Your Welcome Picture Choices in Windows VistaEasily Rotate Pictures In Word 2007Add Effects To Your Pictures in Word 2007 TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional Discover New Bundled Feeds in Google Reader Play Music in Chrome by Simply Dragging a File 15 Great Illustrations by Chow Hon Lam Easily Sync Files & Folders with Friends & Family Amazon Free Kindle for PC Download Stretch popurls.com with a Stylish Script (Firefox)

    Read the article

  • Get records from Access table

    - by chianta
    On Access 2010 I need to use VBA to get the records in a table, process them and put them in a new table. Could you tell me how can I do? Is there a way similar to C # to put everything into a datatable the result of a query? I found an example on how to get the data. http://pastebin.com/bCtg20jp But it always fails on the first statement "ADODB.Recordset". I went to see the included libraries and library that uses ADODB is already included "Microsoft Access 14.0 Object Library". Thanks

    Read the article

  • Disable ctrl+V paste option from excel Template in Vsto

    - by Sangram
    HI all !! I am working on excel template+ Vsto application. I have assign various custom validations and formats for various cells. But whenever i copy & paste something into the cell,these validations do not work (fails completely), is there any way so i can disable ( Ctrl+V ) Paste options from the excel template. I think it can be implemented in vba macros. But i m not sure about it. Thank you in advance. Sangram Nandkhile.

    Read the article

  • Create multiple columns on one sheet from 1 column on another with logic

    - by user450252
    I am new to VBA and I am struggling trying to make this work. I am in need of a macro that will process each cell\column on Sheet1 and put the results on Sheet2. I'm sure this is pretty easy for those who are more advanced with VB code. It contains many columns.. Anytime we encounter a — or an empty cell, we populate the cell with -999 (see the example on Sheet2) on the first column, which contains "0-2". Then we create 2 new columns and populate them with 0 on the first column and 2 on second column (see example on Sheet2). If a value is found on only one side, we then populate both sides with the same number. As each column is being process in Sheet1 and Sheet1: A B Column1 Column2 Title Title2 0–2 0–4 3 — — 5 — — — 10–23 11—29 And the results should look like this on Sheet2 Sheet2 A B C D Column1 Column1 Column2 Column2 Title-A Title-B Title-A Title-B 0 2 0 4 3 3 -999 -999 -999 -999 5 5 -999 -999 -999 -999 —999 -999 -999 -999 10 23 11 29

    Read the article

  • Check for duplicate rows in 2 columns before update

    - by user3891378
    I have a table with 4 columns, and I need to check to see if a Column Pair exists before inserting a row into the database: INSERT INTO dbo.tblCallReport_Detail (fkCallReport, fkProductCategory, Discussion, Action) VALUES (?, ?, ?, ?) The pair in question is fkCallReport and fkProductCategory. For example if the row trying to be inserted has fkCallReport = 3 and fkProductCategory = 5, and the database already has both of those values together, it should display an error and ask if they would like to combine the Disuccsion and Action with the current record. Keep in mind I'm doing this in VBA Access 2010 and am still very new.

    Read the article

  • Create macro to move data in a column UP?

    - by user1786695
    I have an excel sheet of which the data was jumbled: for example, the data that should have been in Columns AB and AC were instead in Columns B and C, but on the row after. I have the following written which moved the data from B and C to AB and AC respectively: Dim rCell As Range Dim rRng As Range Set rRng = Sheet1.Range("A:A") i = 1 lastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row For Each rCell In rRng.Cells If rCell.Value = "" Then Range("AB" & i) = rCell.Offset(0, 1).Value rCell.Offset(0, 1).ClearContents End If i = i + 1 If i = lastRow + 1 Then Exit Sub End If Next rCell End Sub However, it doesn't fix the problem of the data being on the row BELOW the appropriate row now that they are in the right columns. I am new to VBA Macros so I would appreciate any help to make the data now align. I tried toggling the Offset parameter (-1,0) but it's not working.

    Read the article

  • Open excel 2007 excel files and save as 97-2003 formats in VBA

    - by ABB
    I have a weird situation where I have a set of excel files, all having the extension .xls., in a directory where I can open all of them just fine in Excel 2007. The odd thing is that I cannot open them in Excel 2003, on the same machine, without opening the file first in 2007 and going and saving the file as an "Excel 97-2003 Workbook". Before I save the file as an "Excel 97-2003 Workbook" from Excel 2007, when I open the excel files in 2003 I get the error that the file is not in a recognizable format. So my question is: if I already have the excel file opened in 2007 and I already have the file name of the open file stored in a variable, programatically how can I mimic the action of going up to the "office button" in the upper right and selecting, "save as" and then selecting "Excel 97-2003 Workbook"? I've tried something like the below but it does not save the file at all: ActiveWorkbook.SaveAs TempFilePath & TempFileName & ".xls", FileFormat:=56 Thanks for any help or guidance!

    Read the article

  • VBA ActiveX controls grow in size over Remote Desktop Connection

    - by Alistair Knock
    We have an Excel workbook with a number of ActiveX controls, running in Excel 2003 on Windows XP. When connecting using Remote Desktop, the ActiveX controls change font, sometimes font size, and sometimes orientation (in the case of a spinner control). This happens on first connection and also as the workbook is used - some of the controls then enlarge in size, often overlapping other controls and part of the workbook. I read somewhere this may be caused by improper connection management (not closing them) leading to increasing memory usage; are there other reasons why the display is so different over Remote Desktop and are there workarounds? (the properties of each control usually remain the same, so force-resizing them doesn't always have an effect)

    Read the article

  • Excel VBA - How to copy/transpose multiple columns record into individual single row

    - by larry
    I'm working on data migration, need some help on doing a macro to copy/transpose multiple columns record into individual single row. There are also a "tag" in the first row, which indicates the columns that should not be included in the copy/transpose. From: Tag x Name Jan Feb Mar Apr Larry 2 20 34 56 Harry 3 45 77 88 Marry 5 66 44 33 To: Larry Jan 2 Larry Feb 20 Larry Apr 56 Harry Jan 3 Harry Feb 45 Harry Apr 88 Marry Jan 5 Marry Feb 66 Marry Apr 33 The "Mar" data was omitted due to there's a tag (X) above it. The data might be near hundred columns (few years), and some of the months need to be omitted. Any expert able to help on this? I had been spending whole day cracking my head on this. Worse come to worse I might have to manually copy and paste, that would probably took me a decade.

    Read the article

  • VBA text box input mask

    - by Jaison
    I have two validation for date and time as below in text boxes: 00/00\ 00:00;0;0;_ It will take (dd/mm hh:mm) and works fine But sometimes i put 34/34 56:78 it will take , But it shouldn't Date sholdnot go beyond 31, month 12 time 24 and minute 59 Please help

    Read the article

  • Excel VBA to Update SQL Table

    - by user307655
    Hi All, I have a small excel program that is use to upload data to an SQL server. This has been working well for a while. My problem now is that I would like to offer to users a function to update an existing record in SQL. As each row on this table has a unique id columne. There is a column call UID which is the primary key. This is part of the code currently to upload new data: Set Cn = New ADODB.Connection Cn.Open "Driver={SQL Server};Server=" & ServerName & ";Database=" & DatabaseName & _ ";Uid=" & UserID & ";Pwd=" & Password & ";" rs.Open TableName, Cn, adOpenKeyset, adLockOptimistic For RowCounter = StartRow To EndRow rs.AddNew For ColCounter = 1 To NoOfFields rs(ColCounter - 1) = shtSheetToWork.Cells(RowCounter, ColCounter) Next ColCounter Next RowCounter rs.UpdateBatch ' Tidy up rs.Close Set rs = Nothing Cn.Close Set Cn = Nothing Is there anyway i can modify this code to update a particular UID rather than importing new records? Thanks again for your help

    Read the article

  • Excel VBA Text To Column

    - by Pat
    This is what I currently have: H101 John Doe Jane Doe Jack Doe H102 John Smith Jane Smith Katie Smith Jack Smith And here is what I want: H101 John Doe H101 Jane Doe H101 Jack Doe H102 John Smith H102 Jane Smith H102 Katie Smith H102 Jack Smith Obviously I want to do this on a bigger scale. The number of columns is between 1 & 6, so I cant limit it that way. I was able to get a script that allows me to put each individual on one row. However, I am having a hard time getting the first column to copy over to each row. Sub ToOneColumn() Dim i As Long, k As Long, j As Integer Application.ScreenUpdating = False Columns(2).Insert i = 0 k = 1 While Not IsEmpty(Cells(k, 3)) j = 3 While Not IsEmpty(Cells(k, j)) i = i + 1 Cells(i, 1) = Cells(k, 1) //CODE IN QUESTION Cells(i, 2) = Cells(k, j) Cells(k, j).Clear j = j + 1 Wend k = k + 1 Wend Application.ScreenUpdating = True End Sub Like I said, it was working fine to get everyone each on their own row, but can't figure out how to get that first column. It seems like it should be so simple, but it's bugging me. Any help is greatly appreciated.

    Read the article

  • In Excel, VBA - How can we lock resizing of a rectangle

    - by sruthi
    I have an excel sheet that contains two rectangles and text in other cells. I need to allow users to only edit the text in the rectangle. They should not be able to change the size of the object. Applying lock on the rectangle locks the object as well as the text. Does anyone know how I can achieve this?

    Read the article

  • VBA-Sorting the data in a listbox, sort works but data in listbox not changed

    - by Mike Clemens
    A listbox is passed, the data placed in an array, the array is sort and then the data is placed back in the listbox. The part that does work is putting the data back in the listbox. Its like the listbox is being passed by value instead of by ref. Here's the sub that does the sort and the line of code that calls the sort sub. Private Sub SortListBox(ByRef LB As MSForms.ListBox) Dim First As Integer Dim Last As Integer Dim NumItems As Integer Dim i As Integer Dim j As Integer Dim Temp As String Dim TempArray() As Variant ReDim TempArray(LB.ListCount) First = LBound(TempArray) ' this works correctly Last = UBound(TempArray) - 1 ' this works correctly For i = First To Last TempArray(i) = LB.List(i) ' this works correctly Next i For i = First To Last For j = i + 1 To Last If TempArray(i) > TempArray(j) Then Temp = TempArray(j) TempArray(j) = TempArray(i) TempArray(i) = Temp End If Next j Next i ! data is now sorted LB.Clear ! this doesn't clear the items in the listbox For i = First To Last LB.AddItem TempArray(i) ! this doesn't work either Next i End Sub Private Sub InitializeForm() ' There's code here to put data in the list box Call SortListBox(FieldSelect.CompleteList) End Sub Thanks for your help.

    Read the article

  • Is there a JSON parser for VB6 / VBA?

    - by Ben McCormack
    I'm trying to consume a web service in VB6. The service (which I control) currently can return a SOAP/XML message or JSON. I'm having a really difficult time figuring out if VB6's SOAP type (version 1) can handle a returned object (as opposed to simple types like string, int, etc.). So far I can't figure out what I need to do to get VB6 to play with returned objects. So I thought I might serialize the response in the web service as a JSON string. Does a JSON parser exist for VB6?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >