Create Outlook Appointment From VBA
I am probably overengineering my macro, but I would like to setup an outlook appointment in two peoples calendars from my userform. The macro has access to the email addresses of the selected persons, I just want to send date/time and subject.
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Create Outlook Appointment From Excel
I've used some code from another thread on the forum to create an Outlook Appointment and email this as an attached .ics file from an Excel spreadsheet. Everything seems to work fine. The email is sent and the attachment when double clicked opens in Outlook with all the correct information, but when the recipient clicks 'Save and Close' it doesn't save in their calaendar....
View Replies!
View Related
VBA - Create Outlook Message With From-field
I have two question for Excel in combination with microsoft outlook: 1. I was wondering if it is possible to create an email from Excel which automatically adds the From-field with a pre-defined emailadres. I am using CreateObject("Outlook.Application"), but I can not add the From-field. 2. I also would like to know if it is possible to do automatically fill the To-field with the emailadress from the user who send me the original file. Maybe this needs some more explanation (sorry my english isnt too good): * A user can download an excel-form from the internet * The form is sent to my emailadress * I give a number to the form * The user will get a message that his question is attend to with the number of the question So I use a macro-button to reply when I have filled in the question-number.
View Replies!
View Related
Vba Error Run-time 429 Activex Component Can't Create Object - Excel & Outlook 2007
I have some VBA code that in one portion of it an Outlook e-mail is created and the active workbook is attached and sent. This code used to work on Excel & Outlook 2003, but now in Excel & Outlook 2007 I'm getting the error: Run-time error '429': ActiveX component can't create object and is stopping on the line Set OutApp = GetObject(, "Outlook.Application") FY If I comment out the Set OutApp... and If OutApp.... lines and uncomment the Set OutApp create object line, I still get the same error. Dim OutApp As Object Dim OutMail As Object Dim SigString As String Dim Signature As String 'Set OutApp = CreateObject("Outlook.Application") Set OutApp = GetObject(, "Outlook.Application") If OutApp Is Nothing Then Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0)
View Replies!
View Related
Create A Distribution List For Outlook
I want to email with excel, and I know how to do it if I have a distribution list already set up in outlook. I want to avoid having this DL in outlook though, and instead keep a list in the actual excel workbook. I tried having the list and then combining all the cells with a semicolon inbetween the addresses into one single cell, then assigning that cell to a variable and inserting it in the cose in place of the DL name, but it doesn't work. Apparently you can't mail to mutliple address thru the VB code, either a single address or a DL. Am I incorrect in this? So I thought maybe I could somehow create the DL first using the names in the list thru code, and then using that DL name to send the workbook.
View Replies!
View Related
Create/assign Outlook Tasks From A Range Of Cells
I have had some help with this (thanks!) but am stuck. Can someone add to the code below and make it so that multiple tasks, with multiple assignees, can be created from a range of cells, such as: Column A Column B Row 1Task SubjectAssign to Row 2GV LP for AZJohn Brown Row 3GV LP for COJohn Brown Row 4GV LP for ILSuzy Smith Row 5GV LP for INSuzy Smith Row 6GV LP for KYSuzy Smith Row 7GV LP for MNSuzy Smith Row 8GV LP for MSBob Barker Row 9GV LP for NCBob Barker Row 10GV LP for NJBob Barker Row 11GV LP for NMBob Barker Row 12GV LP for NVBob Barker Row 13GV LP for NYBob Barker Row 14GV LP for OHBob Barker Row 15GV LP for SCBob Barker Row 16GV LP for WVBob Barker (Sorry, it didn't translate well. The "GV LP for AZ" is cell A2, "John Brown" is cell B2.) Here is the code I have so far:
View Replies!
View Related
VBA To Refer To Outlook
In Excel, I want VBA to refer to the SENT ITEMS folder in Outlook. I want to loop over all sent items, and if the email address satisfies a condition, then record that fact in Excel. I am good at VBA in Excel, and I have a passing knowledge of VBA in Outlook, but I don't know how to refer to Outlook within my Excel VBA.
View Replies!
View Related
Check If Outlook Running In VBA
I am trying to establish if Outlook 2000 is currently running in VBA , I have tried the following code but this only works when the user is actually positioned in "Inbox - Microsoft Outlook" etc. At this point I don't really care where/what the user has open in Outlook but merely to check if outlook is running. I have tried below but does not work robustly enough. I have also tried AppActivate("Microsoft Outlook") I have also tried IsRunning("Outlook.Application") which does not even compile. Dim OutlookErr, OutlookBox On Error GoTo OutlookIsNotRunning AppActivate ("outlook") GoTo now_send_email OutlookIsNotRunning: OutlookErr = "Outlook is either not open or busy with another task." & vbCrLf & vbCrLf OutlookErr = OutlookErr & "Please Open Outlook, Close any draft emails," & vbCrLf & vbCrLf OutlookErr = OutlookErr & "the Global Address List or other activities and try again." OutlookBox = MsgBox(OutlookErr, vbCritical, "Unable to access Outlook to send email") Exit Sub
View Replies!
View Related
Import Outlook Calender Automatically Using VBA
I am trying to import outlook calender automaticly using vb. I have found this site http://www.kittytours.org/calendarproject/trouble.html that has the macro ImportCalendarData. I try to run it but I get syntax error at the row With ActiveSheet.QueryTables.Add(Connection:= Array( _ "OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data and a yellow arrow is pointing at the top line(sub impo...)
View Replies!
View Related
Outlook Confirmation Message While Esnding Email Via VBA
I have a macro that sends a worksheet via email [Outlook] to a list of recipients. Everytime an email is created, outlook pops up a confirmation window and waits for user input "yes". Can I set up vba or outlook to skip that step? I really want to create a macro with a loop to go through a list of files, execute a macro in each one, save the files and send emails to various people. This process will create about 40 emails and I don'd want the admin person to have to sit there and confirm each message going out.
View Replies!
View Related
Using VBA To Create VBA Code On The Fly
I have a vba module that reads a value from a txt file and saves that value in a variable called "iniInfo". I want to permanently assign that value programatically by using VBA code to create a Public variable e.g. "PUBLIC CONST conFIg = iniInfo" in my modGlobalVar Module. (Of course, this would only create the code if the "conFig" variable doesn't already exist.)
View Replies!
View Related
Create Graph Using VBA
I want to create excel graph using VBA and found difficulties on chart name set to default. the script is like this : ActiveSheet.ChartObjects("Chart 31").Activate Can I set my own name of the chart instead of "Chart 31" (excel default) ?
View Replies!
View Related
VBA To Create New Sheet ...
I would like to be able to have a macro, linked to a button, so that when you press that button it creates a new named sheet based on data in a particular cell. I.e. There is a table with the following data: Apples (A1) Oranges (A2) Pears (A3) There are also the sheets Apples, Oranges & Pears. You enter 'Grape' in cell A4, then when you press the button it creates a new sheet named Grape. Also when a new sheet is created, the 'input cell', in this case A4, is moved down one so that when the next sheet is needed to be added, it doesn't just add the same sheet (i.e. in the example above, we don't end up with a new sheet named 'Grape' each time we click the button).
View Replies!
View Related
Create Tag In VBA?
I found this really cool code that creates a tag cloud in Excel using VBA. It's far too complex for my understanding but I was hoping I could get some of the experts opinions on here about modification possibilities. I have attached the macro-enabled 2007 workbook. What I am trying to do is search through a list of keywords and determine each keyword's density within a list. The list for example could look like this: slow windows xp windows xp running slow windows xp computer [slow windows xp] [windows xp running slow] [windows xp computer] [computer running slow windows xp] "computer running slow windows xp" "slow windows xp" "windows xp running slow" "windows xp computer" You'll notice the characters " [ ] of which I would like to ignore when the cloud builds. The cloud would list the most dense keywords first, and gradually decrease to the least dense keywords. The macro code is inside the workbook but I'll list it here to:
View Replies!
View Related
Create VBA InputBox
I am trying to create an inputbox using code from this site: Sub NumericDataType() Dim lNum As Long On Error Resume Next Application.DisplayAlerts = False lNum = Application.InputBox _ (Prompt:="Please enter you age.", _ Title:="HOW OLD ARE YOU", Type:=1) On Error Goto 0 Application.DisplayAlerts = True If lNum = 0 Then Exit Sub Else MsgBox "You are " & lNum & " years old." End If End Sub I get an error on the first line that says, "Compile error: argument not optional".
View Replies!
View Related
Create Comparison Code In VBA
I have to do monthly comparisons of two excel worksheets, one being a vessel timesheet and the other being an excel download from manpower software that we use. The comparison that is being made are days of the month, whilst the unique identifier between the two sheets (To make it easier to understand I will call them sheet1 and sheet2) is an employee ID. Both sheets, alongside the name and employee ID, list all the days of the month that employees have worked. If they have worked, there is a "1" under that day, if they have not the cell is blank. What I currently do manually is: 1: Search for the employee ID (and/or name) in sheet1 and compare the days with the employee ID in sheet2. 2: Highlight the differences 3: Move onto the next employee ID All differences are highlighted in sheet2. Differences highlighted are in the days only, where if any days are missing/extra in either sheet, then the particular cell(s) are highlighted in yellow. If an employee is missing from sheet1 but is in sheet2, then all the days are highlighted (in sheet2). If an employee is missing from sheet2 but is in sheet1, then that particular employee is copied to the bottom of sheet2 (after last row). As this is horribly complicated to explain, I can attach an example if this is sounding rather inexplicable? Is it possible to attach a xls to a thread?
View Replies!
View Related
Create A New Workbook By Vba Of Excel
I want to the following steps to be done by vba of excel. 1. copy ranges of cells in the active worksheet (sheet3) 2. add a new workbook and paste the copied ranges to sheet1 3. save the new workbook with the new file name (e.g. date) 4. close the new workbook and clear the contents the copied ranges of cells in old workbook. following code and make it more simpler? Worksheets("Sheet3").Activate If Range("l1").Value <> "" Then Range("l1").Value = CDate(Date) End If asdate = Range("l1").Value 'date entered by user resp4 = MsgBox(" Case particulars of " & asdate & " will be backed up and deleted from this sheet! Proceed? (Y/N)", vbYesNo, "Deletion of Data") If resp4 = 7 Then Exit Sub
View Replies!
View Related
Vba To Create A New File From Spreadsheet
I have the following spreadsheet: A-------------B File No.-----PRODUCT TYPE 123456-----NDT 123456-----NDT 123456-----NDT 123456--------- 123456--------- 789110--------- 789110--------- 789110--------- What I need is if there is an NDT in Column B and 123456 in Column A then I need to eliminate all rows which contain 123456. End result A 789110 789110 789110
View Replies!
View Related
VBA To Create A New Folder From A Textbox Value
I don't know if anyone has tried this but it possible using vba to create a new folder in a directory from the text of a textbox? I have made a userform that I use to collect a persons first name & surname. I then created a folder in a directory manually (e.g Z:spnzphotos) I then scan their photo and place it into the folder. Is it at all possible to have a piece of code that once I press a command button is creates folder ready for me to add the photo to?
View Replies!
View Related
Vba To Create Separate Reports From Master
I have the following spreadsheet Columns on master sorted by Column J: A--------------E-------------J SUPPLIER----CARRIER------LOC CODE BELGIUM-----HAM-----------BP HYDRO-------MSC-----------BP DAINIPPON---NNR-----------BP BELGIUM------YM-----------BR BELGIUM------YM-----------BR HYDRO-------MSC----------CA BELGIUM-----HAM-----------CA HYDRO-------MSC-----------CA HYDRO-------MSC-----------DE DAINIPPON---NNR-----------DE BELGIUM------YM-----------DE BELGIUM------YM-----------DE What I need too do based on the Codes in Column J is create a separate workbook for each different code.
View Replies!
View Related
VBA Macro To Create New Worksheet, Charts, Etc.
I need a macro to create the following worksheets and charts from an Excel data set: Three (3) worksheets (already created manually in attached Excel file): 1. Chart Data. (a) Column A in Chart Data is always numbered 1 - 600 (50 years x 12 mos/yr). (b) Column I and column Y data sets (from Prod_Month) created in Chart Data. Each data set can be identified and collated with column F in Prod_Month (API) which is unique for each dataset. 2. Rate vs. Month - plot of Daily Gas (col. Y in Prod_Month) vs. Months (col. A in Chart Data). 3. Rate vs. Time - plot of Daily Gas (col. Y in Prod_Month) vs. Calender Time (col. B et. al. in Chart Data) At a minimum, could someone help me create the Chart Data worksheet from the data in PROD_MONTH? Charting all the columns takes time from Chart Data but any data manipulation macro(s) help.
View Replies!
View Related
Can VBA Create A Named Sheet In One Step?
My vb code currently creates a new sheet via "Sheets.add". This new sheet has the default name of "sheet1" which I rename as "tempSheet". I then populate tempSheet with data, save as a CVS file and then I remove tempSheet. If I stay in my workbook and try to execute the code again, the default name of the sheet it now creates is "sheet2" and not "sheet1" - this is a problem becuase my code is trying to rename "sheet1" "tempSheet" and of course it cant.
View Replies!
View Related
VBA To Create A Hyperlink Drilldown For Each Cell
I need help in making a VBA to create a looping hyperlink drilldown for each cell in the inventory_general wksht. The purpose of this sheet is to allow a user to click on a hyperlink which will then reference a macro to autofilter the data in the bin_lot worksheet to display all rows for that particular item number. Apparently, you can't select all the cells and insert a hyperlink because all the hyperlinks will reference the first cell value for autofiltering. This is what I tried but it's not working obviously. Sub HyperlinkDrilldown() ' ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _ "Bin_Lot!A1", TextToDisplay:=target.value Range("A2:A21").Select End Sub
View Replies!
View Related
VBA - Create Folder With Date In Name, Populate With Sheets
I have a workbook that will have many modules (5) that will perform all sort of checks etc. The output for each module is a worksheet that i need to export to a new workbook named with the name of the original sheet and current date appended e.g. "Dbase 27 06 2008.xls". Every time any of the 5 modules is run a check is performed whether a folder with a specific name and date exists e.g. "Audit Tool 27 06 2008" and if it does not exist yet to create it. The new workbook should be saved to this folder with above mentioned name e.g. "Dbase 27 06 2008". I found some info on this topic but I just cannot assemble all pieces of code together (I am new to this).
View Replies!
View Related
VBA Macro Code To Create Multiple Charts
I need to create 63 charts from data which I have in two columns. I want to create multiple charts using one macro. For the first chart I want it to use cells K2:K80 as the x values, and M2:M80 as the y values. For the next chart I want it to use cells K81:K159 as the x values and M81:159 as the y values. For the next chart I want it to use cells K160:K238 as the x values and M160:M238 as the y values. I want to continue this, creating a chart for every 78 cells of data, all the way until the 63rd chart which uses K4900:K4978 as the x values and M4900:M4978 as the y values. I have created the following macro by " recording." This macro generates the first chart that I want: Sub Macro5() ActiveSheet.Shapes.AddChart.Select ActiveChart.ChartType = xlXYScatterSmoothNoMarkers ActiveChart.SeriesCollection.NewSeries ActiveChart.SeriesCollection(1).XValues = "=Sheet1!$K$2:$K$80" ActiveChart.SeriesCollection(1).Values = "=Sheet1!$M$2:$M$80" ActiveChart.ChartType = xlXYScatterSmoothNoMarkers ActiveWindow.SmallScroll Down:=-3 End Sub How can I alter this macro to create all 63 charts?. It seems like there is an easy way to do this, but I don't use macros very much (at all).
View Replies!
View Related
Create A Named Range In VBA For Column A, Which Is A Sum Of B And C
I would like to create a named range in VBA for column A, which is a sum of B and C. The problem is that A can have 0 as a value. What I would really like to do is define the named range in column A as A2 to the last column with a value in column B(B10) which would make the named range in column a A2:A10. ABC 61555560 00 1250120050 725725 00 850850 1919 7216720016 995995....
View Replies!
View Related
VBA To Create Charts/Graphs From Non Continuous Ranges
I have an excel sheet populated with loads of values. There is a space between each set of data. I need to draw a graph for each section and i cant work out how to do it. I have attached the sheet in question. The gap between each column has "space" written on row, which is needed to prevent it being deleted. The drawing of the graphs needs to be automated as there is going to be 100's of sheets containg lots of data. The column size of each section can change so it needs to be dynamic. I have attached an example sheet
View Replies!
View Related
Create A Single Range From Multiple Ranges For VBA Input
I have a VBA function with the header: cubspline(Xval As Double, XRange As range, YRange As Range) As Double The problem is that XRange (and also YRange) is in different areas of the spreadsheet. I want to combine these areas into one range which I can pass on to the cubspline function. What is the easiest way of doing it? I'm looking for something like a "union" function for ranges in Excel.
View Replies!
View Related
VBA To Create Word File And Add A Custom Property To It
I have an Excel sheet with a long list of data. A short example is shown below: Section | Title | Item 1 | INTRODUCTION | a 1.1 | title2 | b 1.2 | title3 | c 1.2.1 | title4 | d 1.2.2 | title5 | e I made a VBA macro in Excel that runs through this list and creates a new Word file for each item. The filename of the document is based on the data in the Excel file (section and title). Now I would like to add a custom property to each of the newly created Word files, i.e. the value in the 'item' column. Does anyone of you know how I should do this? Or should it be better if I write a macro in Word that runs through the Excel data to create the word files? Here is the code I use to generate the word files:
View Replies!
View Related
Create SQL Query In VBA And Display Result As Table In Worksheet
I need the VBA script in excel that will do a SQL Query, for this case I need to select a value where there are 2-3 tags and between certain period then display the result as a table in a worksheet. Example I have a database with 3 types of tags "Tag A", "Tag B", and "Tag C", and each tag have a value with different timestamp. the database looks like this: No. Timestamp Tags Value 1 1-Jan-2010 Tag A 18 2 1-Jan-2010 Tag C 20 3 2-Jan-2010 Tag A 20 4 3-Jan-2010 Tag B 17 5 3-Jan-2010 Tag C 19 6 4-Jan-2010 Tag B 18 7 4-Jan-2010 Tag A 20 8 5-Jan-2010 Tag A 22 9 5-Jan-2010 Tag B 18 10 5-JAn-2010 Tag C 20
View Replies!
View Related
VBA Macro To Create & Format Text Box On Worksheet
I have code that creates a textbox on a worksheet, copies the contents of a cell from another worksheet to that textbox. I want to be able to select that text and format its appearence ( center the text, bold and font style and size). This is what I have so far but I do not know how to select the text that was imported. Sub textmove() Dim bname As String Sheets("cover").Shapes.AddTextbox(msoTextOrientationHorizontal, 96.75, 512.25, _ 230.25, 120#).Name = "client" bname = Sheets("data").Range("a3").Value Sheets("cover").Shapes("client").TextFrame.Characters.Text = bname With Selection.Characters(Start:=1, Length:=17).Font .Name = "Arial" .FontStyle = "Regular" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With End Sub
View Replies!
View Related
Outlook ... SMS
I was reading http://www.excelforum.com/excel-prog...-in-excel.html And would like to give this a shot. So if you can school me a bit more on it. Ok my cell provider is Vodafone Australia. (I cant seam to find any info on if they provide this service in australia) http://www.microsoft.com/downloads/d...displaylang=en From reading this it uses the phone that is concted to the computer(my case USB).
View Replies!
View Related
Minimize Outlook
I have vba code that opens Outlook so I can run code to send emails... Application.ActivateMicrosoftApp (xlMicrosoftMail) But I don't want it to be visible, I want it to be minimized. If I try: Set olApp = CreateObject("Outlook.Application") olApp.WindowState = xlMinimized I get an error "Object doesn't support this property or method" referring to: olApp.WindowState = xlMinimized I've tried: Set olApp = CreateObject("Outlook.Application") followed later with code to send emails, Set objol = New Outlook.Application Set objmail = objol.createitem(olmailitem) With objmail .To = EMTo .cc = EMCC .Subject = EMSubject .Body = EMBody .NoAging = True .Attachments.Add EMFile .Send End With But I get an error "You don't have appropriate permission to perform this operation" referring to: Set objmail = objol.createitem(olmailitem) Because of the way our network is designed, the only code that works to send emails is: Application.ActivateMicrosoftApp (xlMicrosoftMail) Set objol = New Outlook.Application Set objmail = objol.createitem(olmailitem) With objmail .To = EMTo .cc = EMCC .Subject = EMSubject .Body = EMBody .NoAging = True .Attachments.Add EMFile .Send End With but Outlook remains open the whole time the emails are being sent until it's closed by code later on. Is there a way to minimize outlook AND use the code above?
View Replies!
View Related
Outlook Tasks
I have searched and think I have found what I need to create Outlook tasks from my Excel spreadsheet. I'm hoping that someone here can help me pull it together into something that will be usable in my project tracking spreadhsheet... I try to keep track of milestones... these milestones are listed in column B of my spreadsheet and are in rows 10 through about 105 For each of my customers I then keep 4 columns D, E, F, G - H, I, J, K - L,M,N,O - etc. Each group of 4 is a different customer.... The customer's first column (D, H, L, etc.) is a Due date of the Milestone that is found in column B. The second column is a check box that I use to indicate when the milestone is complete The 3rd column is the completion date The last colum is just a filler space that helps to separate each customer. What I would like to do is insert a button at the bottom of EACH grouping of 4 that when pressed would look at the first column for the customer group and for ANY Milestone that has a DUE date process the stuff in the VB below to create an OUTLOOK task for each item that has a DUE date. (It would be conceivable that as it stepped through each row for a customer group of columns that I could have it create 90+ Tasks in Outlook. A couple of additional things... in row 110 for the first column of the customer I have a DATE or a blank. So for example in D110 it might be blank or a date like 10/29/2007. If it is blank then when I press the button it would loop through ADD the tasks for each row with a due date. If row 110 has a DATE I would get a popup indicating that the tasks are already in OUTLOOK and that they were added on whatever the date is in row 110... This is kind of the safeguard that I don't get the same group of tasks multiple times by pressing the button by mistake.
View Replies!
View Related
Export To Outlook Calendar
i am using the attached sheet to export data from excel to outlook calendar from last 2-3 months. Now suddenly it stopped working for me (I didn't amend the code) All the data i have filled in is in the correct format but the code doesn't export the data after ROW 72.
View Replies!
View Related
|