Automatically Opening Word Documents
Sep 28, 2009
I need a little assistance opening a Word file via an Excel macro. The two files are linked and upon opening, the Word file asks if the links should be updated. I need this to automatically be "Yes" everytime the file is opened.
View 4 Replies
ADVERTISEMENT
May 26, 2006
I have an excel program that is supposed to count word instances in a word document. I can't seem to find the right declaration for a word document.
For example to declare a workbook in excel its
Dim wb As Work Book
I've tried
Dim doc As Word.Document
'or
Dim doc As Word.Application
as shown in some of the forum posts, but an error user-type not defined keeps displaying.
View 2 Replies
View Related
Mar 31, 2012
Below code is for splliting text file into multiple excel worksheet. I want to modify it to splitting text file into different msword documents in folder. Is it possible to change the code
Sub LargeFileImport()
'Dimension Variables
Dim ResultStr As String
Dim FileName As String
Dim FileNum As Integer
Dim Counter As Double
'Ask User for File's Name
FileName = InputBox("Please enter the Text File's name, e.g. test.txt")
[Code] ........
View 3 Replies
View Related
Dec 11, 2013
I have about 600 Word Documents that contains information about clients. Each Word document file name is the name of the client. Example. Tom Smith. I wanted to be able to highlight all 600 word documents and paste them into Excel, so that I can press Ctrl-F to find what ever name it is I'm looking for, then click the name and the word document open. Is this possible?
View 2 Replies
View Related
Jun 5, 2014
How would I modify the below code to extract all of this data from multiple files? I have about a 1000 files that I need to extract all of the data from to manipulate in Excel.
Code:
Sub ImportWordTable()
Dim wdDoc As Object
Dim wdFileName As Variant
Dim TableNo As Integer 'table number in WordDim iRow As Long '
[Code] ...........
View 1 Replies
View Related
Jul 12, 2014
How I can merge multiple word documents based on checkboxes selected on Excel.
Specifically, I have some 75 checkboxes found on Column F with linked cells on Column G (for example, checkbox1 place on Cell F1 linked to Cell G1). Each of the checkboxes have a corresponding Word document (containing text and tables about 1 to 4 pages in length). Based on what checkboxes are selected, I'd like to have those corresponding Word documents merge together and create an entirely new Word file (for sake of order, the datapoints from each selected Word document should be placed at the beginning of a new page in the new file).
The user will eventually name and save the new file on their own.
I'm not familiar with the required code as well as where it should be placed (whether on the excel file that contains the checkboxes, on the individual word documents that are eligible to be merged, or parsed out on all files).
View 1 Replies
View Related
Jun 20, 2013
Basically I have manually generated word documents based on a spreadsheet. Now, I need to countercheck the contents of the word documents with another spreadsheet i.e. make sure the courses in the word document for a particular student is same as that reflected on the spread sheet. Is it possible to write a macro for this? I'm a beginner and I'm waaay out of my depth. I have attached sample documents and spreadsheets.
The link to the documents are as follows: Macro to check data from Word documents against an excel spread sheet
View 2 Replies
View Related
May 31, 2007
I have put together a booking spreadsheet which uses a UserForm. see attached worksheet. When you start the UserForm and select a name, date, number of nights, and then 'Add', the data is added to the worksheet.
1. My first problems is that when I select the 'Cancel' button on the Userform, I would like the spreadsheet to automatically save under C:My Documents. And also save the file as 'Marketing_DDMMYYYY.xls' as todays date.
2. My second problem is that the 'Leaving Data' column sometimes shows the leaving date in American format (MM/DD/YYYY), and sometimes English format (DD/MM/YYYY).
How can I make this always use English format?
View 6 Replies
View Related
Aug 25, 2009
I am trying to open a word document from within excel using
View 2 Replies
View Related
Aug 22, 2013
I have a database list, and run a bunch of formatting, inserting, formulas etc., to be able to have a Word Mail Merge be able to run against the data when finished. I'm automating the process and want to be able to open the Word document when the Excel piece is done, so the user doesn't have to navigate to the file manually.
Since Excel doesn't seem to automatically 'see' Word docs in the Open File dialog list, my Open File code below is getting an error of "File Format is Not Valid":
ChDir "O:UAIBDCustomer RelationsIDHome Office Indexing"
Workbooks.Open Filename:= _
"O:UAIBDCustomer RelationsIDHome Office IndexingID Home Office Indexing Mail Merge Template TESTING.docx"
View 6 Replies
View Related
May 19, 2009
I have attached a spreadsheet with a simple macro. How do i make the macro automatically run when the file is opened.
View 2 Replies
View Related
Dec 1, 2011
I wrote code for a few macros in a "save as" or practice version of a spreadsheet. Once I got the bugs worked out on the practice book I pasted the code into the actual spreadsheet I want to use. The problem is that whenever I run one of the macros it opens the practice book that I was using when I wrote the code. There should be no need for this and I can't figure out why that's happening. The code doesn't mention any workbook by name so I don't know why it would want to open the practice book.
View 4 Replies
View Related
Nov 13, 2008
I use various spreadsheets which use the EOmonth function. The reason for this is that I have a variable start month and then move out for a set period and this is a very easy way of doing this. My only problem is that you have to have the Analysis ToolPak add-in selected, so when you send to other people, it doesn't work. I have use a bit of code to turn this on, but if the disable macros is selected than this doesn't work.
View 2 Replies
View Related
Apr 9, 2008
I am preparing a simple document for employees to use that requires viewing two sheets simultaneously.
To make it user friendly I would like, if possible, to save it so that when opening the file, the two sheets open side by side without the user having to open the new window and juggle with window sizes etc.
View 9 Replies
View Related
May 14, 2007
I'm working on a macro for work. It's a simple workbook with about 10 tabs. I would like for the user to open up the workbook but it not have the prompt foir enabling or disabling macros. Just on this one sheet, not other macros on other sheets.
View 9 Replies
View Related
Mar 14, 2008
I have a problem, where every time I close or open any workbook, Excel prompts me to "Enable or Disable Macros" in one particular workbook, wether I have tried to open it or not. In the said workbook, I have a macro that automatically updates a pivot table upon selecting the worksheet where the pivot table resides.
The code for it is as follows:
Sub UpdateIt()
Dim iP As Integer
Application.DisplayAlerts = False
For iP = 1 To ActiveSheet.PivotTables.Count
ActiveSheet.PivotTables(iP).RefreshTable
Next
Application.DisplayAlerts = True
End Sub
Private Sub Worksheet_Activate()
Call UpdateIt
End Sub
There is something in the code that calls UpdateIt any time a workbook is opened, closed or selected.
View 3 Replies
View Related
Feb 22, 2009
I would like to be able to automatically minimize the Excel 2007 ribbon on opening a particular workbook. My preference is to be able to apply that minimization to certain worksheets only, but if that's not possible then minimizing the ribbons on all sheets in the workbook will be ok.
Will I also need a BeforeClose code as well to reinstate the ribbon so that it is visible when opening subsequent workbooks?
View 5 Replies
View Related
Jul 4, 2013
I am trying to educate myself in the wonders of Excel (2003) and an struggling somewhat.I have a small project loosely based on a shops stock control and have attached a copy of the workbook -
The user normally only has access to columns B, C and E due to the others being locked and the sheet protected.I would like the sheet to be automatically sorted based on column E each time the workbook is opened.I then need to automatically delete a row once an item in column B has been removed (made blank)
View 3 Replies
View Related
May 8, 2009
I'm developing a workbook containing 121 sheets. Sheet 1 is effectively an index, and uses 120 form control checkboxes to unhide and display the selected sheets individually.
The code I'm using for each checkbox is below and is in a module.
View 8 Replies
View Related
Apr 24, 2009
Is there any formula to write digits convert into word ?
Eg: - Can 1020 Convert into "One thousand twenty" with the help of any formula ?
View 9 Replies
View Related
May 15, 2007
I can trying to let the user type a word in to cell A1 and then have Excel remove the rows that contain the word. But VBA below just seem to delete all nonblank rows?
sub delete2()
Range("a2:a200").Select
For Each cell In Selection
If cell.Value = A1 Then
cell.ClearContents
End If
Next cell
Range("a2:a200").Select
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
end sub
how I can update this code?
View 9 Replies
View Related
Jul 20, 2008
On the data sheet I attached you can see easily what I am trying to do:
The macro should do something like this basically:
Column A there is a entry like "L110E (CST_PRG-Wheel Loaders-E series models)"
Lets say we have 10.000 entries more or less like this.
Macro should do this:
* Take first word for example in this case "L110E" and copy into column D same row.
* Take second word's second part in this case only "PRG" and copy into column B same row.
* Take the 3rd word between - - in this case only "Wheel Loaders" and copy into column C.
View 10 Replies
View Related
Apr 9, 2012
I am trying to make an excel vba reference the word 12.0 object library automatically without the user having to manually add them. How I can do this?
View 2 Replies
View Related
Aug 10, 2009
I have created an Excel spreadsheet that collects info from a userform; we are using this as a issue log.
However, at the same time, upon completion of the log, the engineer then needs to fill out the essentially the same information in a Word form for sending off to the customer. I was thinking that perhaps this could be done by using a mail merge but from past experience this generally isn't very user friendly or quick.
Is it possible to automate this somehow using VBA such that when Enter is clicked on the form, not only does it fill in the next available line in the log spreadsheet but it also opens Word and populates the required fields with this same info?
View 9 Replies
View Related
Apr 5, 2014
I'm trying to make a spreadsheet template that will find and replace all instances of a given word with a bold or highlighted version. However, I do not know how to make this process passive and automated. That is, as soon as I type certain words, they should be auto-corrected. Is there a way to set excel so it will recognize certain words and replace them? Is there a way to do this in the settings? I don't think a macro is the right answer in this case, so I put it in the general thread.
View 5 Replies
View Related
Jan 8, 2010
how to write a code where i can open Excel2003 file from Word2003 and delete data from Sheet1 and then close the excel2003.
All this is done from Word file.
View 9 Replies
View Related
Apr 17, 2007
I have a need to open a file from my companies intranet. My current method was to open said file via the method that the recorder gave me. However, I would like ot be able to open a said file without having to start open another workbook.
This is the path:
[url]
So the command is this:
Workbooks.Open [url]
Links are not actual links
So what I need to know. Is how can I open this file without opening a workbook. I haven't been able to use the VB "Open Statement" to open a file and I don't believe that I've been successfull using the Filesystem object either.
View 9 Replies
View Related
Apr 28, 2009
This code will take the value of the active cell (which is a filename) and open the corresponding PDF document of the same name.
Sub OpenPDF()
Dim fName As String
Dim fExt As String
Dim fPath As String
Dim fFullPath As String
fName = ActiveCell.Value
fPath = "M:Books"
fExt = ".pdf"
fFullPath = fPath & fName & fExt
ActiveWorkbook.FollowHyperlink Address:=fFullPath, NewWindow:=True............
View 9 Replies
View Related
Jul 13, 2009
I receive a Weekly list; let’s call it “Doc1” with a load of order numbers in column A. I then have another excel document, lets call it “Doc2” also with order numbers in column B.
Is there a way to see if an order number in Doc1 already exists in Doc2; perhaps change the font colour to red for example (in Doc1 only)? I don’t want to affect Doc2 in any way I am not allowed to alter it at all.
View 9 Replies
View Related
Feb 7, 2014
I have several excel documents all linked to one unique excel document which I will call document A.
Document A is a performance spreadsheet where I have percentages, sales figures and times, for my sales team.
Each sales person has their own unique dashboard (another excel document) that I am currently trying to finalize.
Their personal dashboards have pie charts with text boxes. The text boxes within the charts link up to their relevant cells in document A.
When Document A is open and I open 1 of the sales person's dashboards. Everything looks good and works, however.
When I close document A the dashboard information changes. For example, the dashboard information could be showing 25% but when I close document A it reverts to 0.25
If I close down the dashboard and open document A back up, change it to 30% then close it. The dashboard recognizes the change BUT reads as 0.30. This is the same with them all.
The only fix I have figured out is creating another tab in Document A then duplicate of all the information required for the dashboards then save the cells as TEXT (as opposed to currency, percentage etc).
This kind of defeats the object because I have formulas set up in Document A and don't want to be doing twice the work.
View 4 Replies
View Related