macro
10 TopicsAll the macro parts are appeared as "{MACROBUTTON AcceptAllChangesShown}"
Hello. I am having trouble with my word format. All the macro parts are appeared as " { MACROBUTTON AcceptAllChangesShown } " after I opened a new reference style file from Endnote. I removed and reinstalled the office, but it didn't help. I am currently using Office Home & Student 2016. Need help!52Views0likes1CommentSending MS Project task to Outlook as an appointment in a custom calendar
I came across this macro which is working fine thus far. What it does is that it sends a task in MS Project to MS Outlook as a new appointment to add to my Outlook calendar. Sub Export_Selection_To_OL_Appointments() Dim myTask As Task Dim myItem As Object On Error Resume Next Set myOLApp = CreateObject("Outlook.Application") For Each myTask In ActiveSelection.Tasks Set myItem = myOLApp.CreateItem(1) With myItem .Start = myTask.Start .End = myTask.Finish .Subject = " Rangebank PS " & myTask.Name .Categories = myTask.Project .Body = myTask.Notes .Save End With Next myTask End Sub The code currently creates an appointment in my default Calendar but I wanted for it to create an appointment within a different calendar with a different name. I sought help else where and was provided this as a way to reference a non default calendar, which is below Option Explicit Sub NonDefaultFolder_Add_Not_Create() Dim myOlApp As Object Dim myDefaultStore As Object Dim nonDefaultCalendar As Object Dim myItem As Object On Error Resume Next Set myOlApp = CreateObject("Outlook.Application") ' Consider this mandatory. ' Limit the scope of the error bypass to the minimum number of lines. ' Ideally the scope is zero lines. On Error GoTo 0 If Not myOlApp Is Nothing Then Set myDefaultStore = myOlApp.Session.defaultStore Debug.Print myDefaultStore ' This references a calendar on the same level as the default calendar Set nonDefaultCalendar = myOlApp.Session.Folders(myDefaultStore.DisplayName).Folders("Calendar Name") nonDefaultCalendar.Display ' Add to non-default folders (or create in the default then copy or move) Set myItem = nonDefaultCalendar.Items.Add With myItem .Subject = " Rangebank PS " .Display End With Else MsgBox "Error creating Outlook object." End If End Sub I am very much a novice and wassnt sure where I was supposed to add the above into the original code so I tried this. Option Explicit Sub NonDefaultFolder_Add_Not_Create() Dim myTask As Task Dim myItem As Object Dim myOLApp As Object Dim myDefaultStore As Object Dim nonDefaultCalendar As Object On Error Resume Next Set myOLApp = CreateObject("Outlook.Application") For Each myTask In ActiveSelection.Tasks Set myItem = myOLApp.CreateItem(1) With myItem .Start = myTask.Start .End = myTask.Finish .Subject = " Rangebank PS " & myTask.Name .Categories = myTask.Project .Body = myTask.Notes .Save On Error GoTo 0 If Not myOLApp Is Nothing Then Set myDefaultStore = myOLApp.Session.DefaultStore Debug.Print myDefaultStore Set nonDefaultCalendar = myOLApp.Session.Folders(myDefaultStore.DisplayName).Folders("B2A Projects Calendar") nonDefaultCalendar.Display ' Add to non-default folders (or create in the default then copy or move) Set myItem = nonDefaultCalendar.Items.Add With myItem .Subject = " Rangebank PS " .Display End If End With End Sub Unfortunately I get this error "Run-time error '-2147221233 (8004010f)': The attempted operation failed. An Object could not be found. It highlights this as the error Set nonDefaultCalendar = myOLApp.Session.Folders(myDefaultStore.DisplayName).Folders("B2A Projects Calendar") If it helps this is where the B2A project Calendar appears in outlook calendr.jpg So its a calendar I created and then I share it with my other team members. Any help would be greatly appreciated! Thanks1.1KViews0likes0CommentsMacro issus using files stored in sharepoint
We have created a macro that use excel files stored in a SharePoint as data base. It works very well, but some users have issus and can not use the macro. The Macro have two buttons and when they click on, system open a windows account window, when they click in the account nothing happens or macro is closed and database is showed (we don't want people be able to access to this database)... Please, could you help me to solve this permissions problem? Example of the windows account window below.699Views0likes0CommentsInsert Degree Symbol in Average Calculation
I have a list of temperatures that is 364 rows long and have an average calculation at the bottom. I am attempting to find a way to enter, if possible, the degree symbol ASCII 0176 in the line of temps as well as the overall average. When done in VBA/Macro using a script I copied, it changed the formatting of the filler color and number colors but did put the degree sign in. It expanded my average into an additional 9 digits to the right of the decimal point. I'm attempting to deal in whole degrees WITH the degree sign leaving my conditional formats in place alone. Any help??? Thanks, TRS1112.9KViews0likes6CommentsExcel Table Size in Macro
Hi, I download external Excel information and run a macro I created for it. It works great. However, the external info I download grows every week with new rows and when I run the macro, the new rows dont get included in the table. This is part of my macro to turn it into a formatted table: ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$X$125"), , xlYes).Name ="Table1" So, it creates a table and formats it with 125 rows. But next week, there may be 130 rows, not 125 rows. Since the Macro only goes to row 125, the table stops at row 125 and misses the last 5 rows. Question: Other than setting the table size in the macro from "$A$1:$X$125" to something like "$A$1:$X$1200", how can you select all the rows (including the new 5 rows) automatically without making the table so large by using ("$A$1:$X$1200")? Thanks, Wayne.13KViews0likes6CommentsMacro issue with email connectivity
so i have a macro that i send each day for work - it's on my excel spreadsheet. it's supposed to automatically send my pnl sheet to the designated people on email. it works fine on my home laptop, but here on this computer it doesn't work for some reason not sure if it's because there is an issue that the email is not linked somehow? or that maybe my antivirus is blocking -14KViews0likes21CommentsMarco to create .CSV
This is one of my first macros so please be nice:). I have pieced it together through recording and Google searches. It performs as expected but the program/website used to import the file does not recognize the file type. If I open the file and select "save" and "yes" to keep using CSV format and then close the file and select "no" to save file, the program/website will import the file. I think this is the piece that is not saving the file correctly. I appreciate any input. Thanks.945Views0likes0CommentsSimple Text Searching Macro
My problem is simple in design, but I won't comment on the difficulty of execution. In summary, I need to match data from two columns of data with the corresponding data in a separate two columns of data. The data is just a text string, specifically the name of a company, and a location (city, state). Manually I accomplish this by looking at the raw data here: On the first line I see that it's Company AAA, located in Washington, D.C. I then turn to the other set of data: If company AAA is listed here AND the city for that particular company is as well, I delete the original row of data I started with. If not, I abandon the search for this first data set and move back to the raw data, and repeat for the next line. By way of another example, you will notice that Company C, in both Nashville and Memphis are in both data sets and therefore would be deleted from the first. I understand the basic idea of several loops with nested conditional statements but I'm far more interested in having someone produce this straightforward macro for me instead of spinning my wheels learning this specific language. Obviously, I would pay for this. Does someone think they can help?926Views0likes0Comments