Generate A Word Doc
Jun 9, 2009
I have a macro here that is not working becuase User-Defined Type not Defined. I think i understand it but i want to make sure and if there is any advice for the macro below even better.
what is in red below is what i think i need to identify as Type /end Type.
these are named cells from my data page.
Sub Makeworddoc()
' create a word doc
Dim wordapp As Object
Dim data As Range, message As String
Dim Notes As Integer, i As Integer
Dim Participant As sting, POC As String, phone As String, Email As String, Staff As String
Dim Contact As String, When As String
The rest of the macro is
' Collected information from worksheet
Set data = Sheets("data").Range("A13:G13")
Notes = Sheets("data").Range("notes")
' updated status bar
Application.StatusBar = "Creating Word Doc."
' assign current data to variables.............
View 9 Replies
ADVERTISEMENT
Jan 23, 2014
All I want is to generate a word document with built in word header and footer (header and footer style name is "alphabet") based on the values which i mention in excel(path,word file name and header content.
View 1 Replies
View Related
Jun 18, 2012
I need to generate a microsoft word document from the data encoded in my excel spreadsheet. I am currently using MS office 2007.
in the Excel Spreadsheet from columns C to F "a) b) c) d)" was not typed but in the word document it automatically appears before the choices encoded in excel. Another thing is that some of the choices typed in the excel spreadsheet are in bold font and I want it to be generated in word document with the bold font as well.
By the way I am planning to use this technique to create a 100 item multiple choice exam for my students as I find using EXCEL to generate the document a lot easier than creating the test manually in WORD.
View 1 Replies
View Related
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
Jul 6, 2009
Is it possible to export Excel cell contents to Word fields in a protected Word document? For example...
What code would be needed to tell Excel to open up, copy and export the contents of A2 in the active sheet of a workbook to "Field 2" in a Word document named "Report 01" and then put the contents of B2 to "Field 2" etc?
Do both applications have to be opened up at the same time or is Excel able to open up Word on its own? Will the macro be able to....
1. Automatically open up the correct Word document?
2. Look ONLY in a certain folder for the "Report 01" Word document?
or
Bring up a "selection" box that allows you to select the document you wish Excel to export it's data to?
3. Close and save the Word Document without any user intervention?
View 2 Replies
View Related
Feb 16, 2012
I need to count how many times the word Test is in the range B4:H9 with
Range N2 = Test the formula below works if Test is only in the cell once.
=COUNTIF($B$4:$H$9,"*" & N2 & "*")
But I have data in cells like below, this is all in one cell, so how would I have it count all the times test is in the range when some cells have test 2 or more times in a single cell?
5
Test
8am-2pm
Test
5pm-10pm
View 5 Replies
View Related
May 6, 2009
How can I use the IF function, to make entering a word, space then word display correct and incorrect if not.
View 13 Replies
View Related
Sep 3, 2009
I need my macros to search for the word "Cancel" or "Cancelled" in columns "T" and "U". Once found, I need the macros to make that entire row an opaque shading.
There will be other wording in these cells that contain "Cancel" or "Cancelled". Is it possible for the macros to search in the sentence and find the words "Cancel" or "Cancelled"
I started on the code below but am stuck.
View 14 Replies
View Related
Jun 9, 2009
Have problems using find and the Dictionary
What Im trying to do is find a certain word in a string then return the number associated with that word
View 7 Replies
View Related
Jan 4, 2012
I am trying to automate the below process:
1. I have a excel file with Japanese words in column A and their English equivalents in column B.
2. I am trying to create a Macro and assign it to a button. On pressing the button Macro should be able to:
3. open a form where I can enter location of a word file.
4. Macro should open the word file specified in (3).
5. Macro will pick up first Japanese word from excel file (Sheet 1 - A1)
6. Search for that word in Word file
7. Replace the Japanese words in Word file with their English equivalent from excel (B1)
8. Then it should search for second word (A2) and replace with its equivalent (B2) and so on till it reaches last filled cell in excel file column A.
After a lot of search I could find a code from net (Below), made a few changes, but it is not working.
========================================================
Private Sub OK_Click()
' Requires a reference to Microsoft Word xx.x Object Library
Dim sFile As String
[Code]....
View 1 Replies
View Related
Mar 14, 2014
I would like to have a formula find a specific word in column L and return the sum from column E for the same fund from column C.
I tried using =SUMIF(L:L,"*annual*",E:E) but that gives me the sum of annual for the entire column. I need to be able to specify the fund.
word "annual" also appears in "semi annual" so I need to be able to separate the two.
View 5 Replies
View Related
Jan 22, 2013
I want to say if the word 'suitcase' is in column W (any row), place the word 'suitcase' in column Z, same row.
View 2 Replies
View Related
May 1, 2009
I am in the middle of automating a process here at work, the program takes a word, "pencil" for example, from excel. It will then open up a word document with content already in it (premade template). The program will then find all instances of a string, "placepencilhere" for example, and will replace that instance with the string from excel.
Basically I want to be able to take a variable that has a stored string value from excel and use it to replace another variable in a word document.
I tried recording a replace (ctrl+f, replace tab) macro, copying the code, and inserting it into the excel vba code.. but I get a error message. Here is what I have:
---
View 11 Replies
View Related
Jul 18, 2008
I have a bunch of cells in column b that have products.
Column B
Dell 24" lcd
vaio sony laptop
8.0 mpxl kodak camera
photoepsonprinter
Basically in Column A I want a formula that'll say.
If the word "dell" is somewhere in cell b1, then put the word "Dell" in cell a1.
If the word "sony" is somewhere in cell b1, then put the word "sony" in cell a1.
And then so on and so forth down through column A. The brand names are potentially endless, so is there a easy way to on like a seperate sheet make a list of brand names and have it pull from there?
Originally I made a if function that said if the brand name was contained in the cell then output the brand name, but that caps at 7 for the amount of brands i can use....
View 9 Replies
View Related
Jan 22, 2014
01. I want to Type "Al Raha Pharmacy" in a cell
02. When I type "Al Raha" and I press space, then the word automatically changed to "Al Rahma"
03. I tried this in other cells also but the result is same.
View 1 Replies
View Related
Oct 3, 2008
I have a list of names on a worksheet in cells C9:C:C395. Their respected team numbers are located in G9:G395. What I'd like to know is it possible to put a team number in lets say cell K2 and have a listbox appear with the names of each of the team member from that team.
View 4 Replies
View Related
Mar 12, 2014
I have a big Excel file with 20+ sheets. All these sheets have different margins and layouts.
I need to generate a Single PDF with all these sheets. Is it possible?
When I save the file as PDF, it converts only the current sheet and NOT the whole file. As I said all my sheets have different margins and layouts, I can not combine them into a single sheet.
View 2 Replies
View Related
Nov 12, 2008
I have an excel document that is a form.
Can I use the data collected from this form to generate another new document?
I want the user to enter some data and hit "Create" and a new excel document with that data is created.
Also, the new document has some data in it already. So it has some data and it will get new data from the form.
View 3 Replies
View Related
Apr 27, 2009
here it is..
500 to 599>>>> equal t0 600
600 to 699>>>> equal to 700
the numbers from equals is the scale of the drawings which i use plot.
sample:
32039.98
31959.50 ...
View 9 Replies
View Related
Jan 8, 2008
Analysis of Profit is very impt in business , that is why i keep trying to find way to use excel to generate profit report.
I have been trying to solve this for last one month. even when i bath... But no result.
May i ask any one here know how to convert my data to a report using . Below table said every thing.
Project (10) HIJ1My Raw Data File 2BrandMonthProfit In %3Brand AJan 0730%4Brand BFeb 0750%5Brand AJan 0730%6Brand BFeb 0750%7 8 9I Need Report In New Work Sheet 10 11BrandJan 07Feb 0712Brand A30%30%13Brand B50%50% Excel tables to the web >> Excel Jeanie HTML 4
View 9 Replies
View Related
Jun 17, 2006
on generating a unique ID for each row in a spreadsheet. My current manually entered ID numbers are alpha numeric, so I want to use a formula or macro to follow the same format.
For example the IDs may be ABC001, ABC002, AAA001, AAA002, AAA003. So user enters info in a form built in excel, and I run a macro which takes the data entered into that form and populates another spreadsheet and I assign an ID number.
The ID number should look for the next number in the sequence, based upon the first three characters.
View 4 Replies
View Related
Dec 28, 2006
Is there an Excel Addin that will let me figure out the total number of combinations for any size number pool I specify (39,49, 53) and with any combination quantity I specify (3, 4, 5, 6)? And most important is that all these combinations be displayed in a column separated by commas.
Is a VBA script designed to handle something this complex.
View 9 Replies
View Related
Feb 2, 2007
I am working in a Lotus notes application that enables me to add an Excel report and chart. I have no problem adding a report using their template creater. however it says for me to add a chart I have to create an excel template that must contain the vbscript needed to generate a chart.
I tried using the macro editor to create the report but i get an error "Microsoft Excel Select method of range failed".
View 3 Replies
View Related
Nov 18, 2012
I am looking for a code to generate a combinations of x numbers taken 5 at the time. t
View 2 Replies
View Related
Jan 5, 2014
What is my requirements in the attached snapshot and excel file .
Please check the attachment. Charts.JPG
View 1 Replies
View Related
Apr 29, 2014
I have a sheet with work tasks on. Column I shows the completion date for each project. In column J I would like an automated response linked to todays date. Can we use row 2 as our example? So I need in this case cell J2 to show the following:
- If todays date is more than 5 days before the completion date (in cell I2) I would like the cell J2 to show "IN PROGRESS"
- If todays date is less than 5 days before the completion date (in cell I2) I would like the cell J2 to show "AT RISK"
View 4 Replies
View Related
Aug 19, 2014
I am creating an excel spread sheet for a project I am doing, I need to create a daily chart for 6 months of water usage that results in averaging set targets.
I have made a chart with the average uses per day but would like to have daily numbers that average out to what i have but in a random sequence e.g. i have that a shower uses 320 litres per day for 2 people is there a way i can make a chart that says: 300 (a1) 340(a2) 260(a3) 360(a4) etc i need to do this for 180 days with random numbers generated to average the same overall. I dont know even how to generate random numbers.
View 4 Replies
View Related
Mar 31, 2014
As you can see I have only one attached file which has a two sheet tab, one is the "DATALIST" and the other is "FORM" in which this tab will be the one to be generated with blank highlighted yellow, and get data from datalist tab.....
View 4 Replies
View Related
Nov 24, 2008
Is there a way to auto generate passwords? I would like the result to start off with the word "cook" and end in numbers. Is this possible?
Password: cook###
View 7 Replies
View Related
Feb 1, 2009
I am trying to generate random numbers between 0 - 9 in ten cells that do not repeat an always include every value 0 - 9 (0, 1, 2, 3, 4,...9). The object is to have the numbers randomize each time. So cells A1:A10 could look like this:
3
9
4
5
1
0
6
8
7
2
Or, they could look like this:
9
7
5
2
8
4.................
View 4 Replies
View Related