VBA To Send Text File To USB Dot Matrix Printer

May 22, 2014

How do I send a text file to a usb dot matrix printer as opposed to a parallel port.

I have an Excel spreadsheet that prints labels on a dot matrix printer. Until now the printer used a parallel port. My Excel workbook generates a text file "C:PRINTLABEL.TXT". I then execute a shell command to run a batch file called

"C:PRINTLABEL.BAT". The BAT file contains the line
----------------------
copy C:PRINTLABEL.txt lpt3
------------------------
The shell command contains the lines (not all lines are shown)
-------------------
On Error GoTo ErrorHandler ' Enable error-handling routine.
RetVal = Shell("C:PRINTLABEL.BAT") ' PRINTS LABEL.
Exit Sub ' Exit to avoid handler.
----------------------------------------

Now I have to deal with a newer dot-matrix printer (EpsonLX300+II) that is able to use a USB port.

How do I print the plain txt file to the printer using the USB port (LPT1/2/3 are all parallell ports, so the batch file does not work as it stands.

View 4 Replies


ADVERTISEMENT

Printing With Dot Matrix Printer On Pre-printed Forms

Dec 12, 2013

My company started using preprinted forms to print out delivery receipts with a dot matrix printer. We only need to print 2 pieces of data on this form at specific places, then move onto a new form and print the next 2 pieces of info. Ive tried searching and haven't found anything remotely related to this situation.

Essentially, we will have a spreadsheet with 2 columns with cells containing stock codes eg:
StockA1 StockB1
StockA2 StockB2
etc

The number of rows will vary, one week may be 20 rows of info, the next may be 76 rows.

I need to be able to take the info in each row, and send it to the printer so that it prints in the right place of the form, and move onto the next row/page until all rows have been printed.

Currently, I have a spreadsheet with a bunch of empty rows, 2 rows where the info needs to be, then more empty rows followed by the next 2 items, empty rows etcetc...As you can imagine this could require some tedious reworking week after week as the number of forms to be printed changes each week.

There has to be a better way to do this! I havent got the experience of working with excel (or dot matrix printers)

View 5 Replies View Related

Print Macro To Send To PDF Printer

Apr 8, 2009

I want to automate (with the click of a macro button, or hot key sequence) is to:
· take a pre-set print area (which is always the same – 1 page wide x 1 page tall)
· send to the printer
· select the PDF printer from the list (not the default printer for the computer)
· Automatically change the save PDF file name to “(Cell A1) – Weekly Update – (Today’s Date).pdf”
· Change location to save file on Desktop

Feels like a pretty lofty goal for a macro to do all of that – please let me know if that is even possible to set up.

View 9 Replies View Related

Fill Matrix From Text File

Mar 28, 2008

I have a particular problem to solev. I am an average Excel user with no VBA experience, so. I want to construct a matrix with 72 columns and rows filled with symetrical values eg

1 2 3 4 5
1 0 5 7 8 1
2 5 0
3 7 0
4 8 0
5 1 0
etc

I have a CSV file with the values in the form of {column},{row},{value} eg 5,70,8. how to get these simply into Excel? This is not a one-off operation, the text file is an export from AutoCAD and will be run fairly frequently, so doing it manually is not an option!

View 6 Replies View Related

Search Word For Text And Send Values Next To Text To Excel File

Apr 30, 2009

I am using Windows XP and Office 2003.

I am looking to automate a process where information is sent to someone in a text format and they in turn transfer that data to an excel file. It basically looks like this (but includes a lot more info):

Service Request #: 123456
Instrument Type: New Instrument
Lot/Serial #: 123456
SR Type: Product Complaint
Service Coverage: Maintenance Agreement

The info on the left (text preceding the colon) is always the same but the values following the colon can change. The excel file has all of the text before the colon and they just enter the information into the cells. I am looking to make it so that an Excel macro (or maybe a word/outlook macro) automatically scans the text document and sends this info to the exact same cells in excel every time.

The text file is actually a message from an Oracle database and I am not going to be able to make any changes to the way the data comes in.

View 9 Replies View Related

VBA - Send Emails To A List Based On Matrix

Apr 30, 2012

Here is how my spreadsheet is set-up. This is unfortunately not something I can change :

- I have a list of products A to Z, starting in A2

- I have email addresses in row 1, starting in B1 up to Z99

- I have a matrix with 4 possible values in B2 to Z99. The values are either "L", "C", "I" or blank.

Here is what I am trying to do :

I would like to have a macro created for each product (column A) to send emails to those indicated in the matrix.

When the email is identified with "L" in the matrix for particular product, this email should be in the To:, when "C" or "I" it should go to CC:

View 7 Replies View Related

Correlation Matrix - Cannot Open Source File

Apr 24, 2014

I have a workbook entitled "Correlation Matrix". I download data from my data provider and then update it in excel each night. I have several worksheets in the workbook, one called "MCC". Today I made a copy of MCC, named MCC2, to experiment, then deleted it. Now, after I update my data in Excel it gives me the msg, "We can't open the source file '(Path)[Correlation Matrix.xlsx]MCC2'".

The data updates fine and all values are correct in the worksheets. I've tried closing and reopening the file, closing and reopening excel, but I'm still getting this msg when updating the data.

View 2 Replies View Related

VBA- Specs Listed (Send You File)

Apr 9, 2007

I have a project I need to get done, and I've done most of it. But, there are a few things in VBA I'm unfamiliar with, and I was wondering if I could send you the file so you could take a look at it, and see if you're able to do it. This involves VBA. Honestly shouldn't be too too difficult, but something beyond what I can do. I have the specifications listed already, and I am ready to send it to you. Anyone feel comfortable taking a look at it?

View 9 Replies View Related

Automatically Send File From Outlook

Aug 29, 2006

I have attached a file that I need to update every hour and send to an email address every hour from 9am to 4pm on certain days of the week. To update this file, I need to hit "update" and "enable links" and it needs to send to a certain email every hour. Is there a way to automate this process?

View 2 Replies View Related

File/Send To Option Is Available On Laptop But Not On The Desktop

Dec 23, 2008

I have Excel 2002 installed on Desktop & my Laptop. The Send To option is available on my Laptop but not on the Desktop.

View 4 Replies View Related

VBA To Send Email Switches File Status

Feb 4, 2014

Below is a VBA that sends an email with a range from Excel in the body of the email, and the entire book as an attachment from a temporary file. It works great, except that I need the entire file to close, and it will not because a message pops up that says "Do you want to save file before switching file status". This will not let Excel close. I need to bypass that pop up message. Display Alerts = False did not work. In the bottom of the code below, there is a spot that tries to kill the temporary file, but it does not work until "No" in the pop up message is pressed. Again, I need to bypass that pop up message.

View 2 Replies View Related

Matrix Query Using Text?

Mar 18, 2014

with the table give below, i need a formula to get the sustainability. Eg. cell D1 =VG and D2=G, then D3 value should be G (as per the table below).

Prev Yr
Current Yr
Sustainability

EX
EX
EX

VG
G
G

G
EX
VG

View 2 Replies View Related

Text Matrix Translation

Jul 25, 2007

i have a text file with the following data

12345
-----
A |xxxxx
A1 |.x...
A2 |..x.x

I need to get an output better on text (excell is limited with rows and the matrix can have up to 5000 rows and lines)
i tried to open the file with excel but every line is a string and i can't separet it

the output will be

A 1,2,3,4,5
A1 ,2,
A2 ,3, ,5

it will save me a lot of time

View 9 Replies View Related

Send A File By Email Versus To A Local Desktop

Jul 13, 2007


Case "TD"
strfilename = "\TomsblackibmTomsProposals" & strfilename

I would like to send this file by email if possible instead of to his computer. The user recently went from a desktop "in the office" to a laptop "all over the place".

Sub Save_and_SaveSalesman()


Dim strPath As String, strPath2 As String, CurrPath As String

Dim WB1 As Workbook
Dim WB2 As Workbook

Set WB1 = ActiveWorkbook

'First thing, save my work
WB1.Save

CurrPath = WB1.Path

'ASSUMING THAT C6 and O3 are BOTH in WB1
'move this line HERE: only do this once, and concatenate in the Select..Case later
'doing thsi inside the Select..Case pulls values from WB2, which might cause errors.............................

View 9 Replies View Related

Search For File Locate User Send Mail

May 11, 2007

I need to build vb that will move threw a folder earch files this source folder will be s:dc eports there will be multiple types of files. If the file ends with .ERR and the file size is > 0.1 KB THEN take file and open it then find the user id this will be 6 didgets .. this then needs to be located(if u look at attached spreadsheet “CTR208088.ERR” and go too column “AB” you will see “FA2 INPUT BY:311752 CODE) and then take and match THIS CODE (311752) to a workbook called “cashfrontieradmin11” there will be a “user name” column ‘A” in a “input names” tab and next to it column “B” “ full name” it will then register name and attach an email to user saying they have error “processing idx file into hiport”.

It will then attach error file to email and send to appropriate user(that is written in error log ) Example file is here ..the only issue I guess is being able to read the character placing(user id) in the message file..to pick this up and map back to admin file I will attach both files

View 5 Replies View Related

Extract Numbers From Text Into A Matrix

Jul 9, 2007

I have a large number of text strings representing chemical formulas. They include letters for the element names and numbers for the number of atoms of each type.
For example:

C18H35NO3
C4H7S
C11H16O2Na

etc.
The element name has either one or 2 letters (one capital, one small), if there is no number and no small letter after the capital letter that means that there is only one atom of this sort(like in C18H35NO3 - there is one N atom). If the element is not listed in the text string it means that it is not found in that particular formula (i.e. the numerical value is 0). Is there any function that could help converting such a vector (say A1:A3) into a matrix that will have the following form:

C H N O S Na
18 35 1 3 0 0
4 7 0 0 1 0
11 16 0 2 0 1

View 9 Replies View Related

Creating Adjacent Matrix From Incidence Matrix

Aug 26, 2007

I have a data chart on 200 people with overlapping membership in 20+ groups, represeted as binary (1=member, 0=notmember), for example: ...

View 9 Replies View Related

Return Inverse Matrix Of Large Matrix

Aug 22, 2008

Using VBA, I wish to work out the inverse matrix of a large matrix (100*100), but keep getting the # Num! Error. I am using the minverse function. I have defined variable as "variant", does this give me the same possiblities in terms of number size as the variable "Double"?

View 9 Replies View Related

Looping, Open Text File, Copy Text, Close Text File

Sep 18, 2009

I have an existing spreadsheet with a column of strings (actually VIN numbers). These numbers correllate to a bunch of text files, that can exist in one of three folders (UsernameDesktop1, 2, or 3) on my desktop. What I need the macro to do is:

1) get the filename from A2 (A1 is a heading row)
2) Find the appropriate text file in one of the three folders
3) Put the folder name into I2
4) Scan the text file for some strings, and copy some data that follows those strings into J2:O2 (I can handle programming this)
5) Close the text file
6) repeat above for the remainder of filenames (about 1800 files)

View 3 Replies View Related

Excel 2007 :: Macro To Send File As PDF From Outlook To Multiple Users?

May 13, 2013

I currently have a spreadsheet setup on a Macro to send & distribute a message from an 2007 Excel file to multiple users through Microsoft Outlook 2007. It is currently setup to send as an attachment. I need to find a way to have this file be sent as a PDF file. I know you can save Excel as PDF's so there must be a way to send them & attach them to as a PDF.

View 3 Replies View Related

Send SMS Text Message With VBA

Sep 20, 2007

Does anyone know if there is a way of sending SMS text messages from excel?

And if there is can this be automated from within VBA so that the OnTime method could be used?

View 7 Replies View Related

How To Send A Range Of Cells In A Sms Text Message By Using VB

Sep 6, 2009

How to send a range of cells in a sms text message by using Visual Basic for Applications in Excel?

BTW: I really need this to work for my job! So any feedback would be greatly welcomed. Please read below to understand what I'm trying to do. I need to be able to send my guys their daily goals via sms text message:

The following works great for sending a range of cells in a email message: ....

View 14 Replies View Related

Enable Macro Automatically - Then Send Send Email

Sep 7, 2008

I used Scheduled Task to set up my spreadsheet to open daily. I have the code with assistance to pull out the due date items and place them into an email.

I have come across XLSTART/AUTOEXEC/ACTIVATE...ETC...
But cannot figure out the code that will automatically "enabling macro" once Scheduled Task opens the spreadsheet?

Then once the macro runs, the email with the due dates, how can this auto send without user interaction?
(currently I would have to hit send)

I am trying to make the process totally automated to open the spreadsheet at a certain time, send the email with due dates and close the spreadsheet.

Following code in ThisWorkbook--

Private Sub Workbook_Open()
Check_Date_Send_Mail
End Sub
Code in Module1--

Option Explicit
Sub Check_Date_Send_Mail()
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Dim rnDate As Range, rnValue As Range
Dim stAddress As String, stMsg As String
Dim stRecipient As String, stSubject As String
Dim stPost As String
Set wbBook = ThisWorkbook
Set wsSheet = wbBook.Worksheets("Sheet1")
With wsSheet
Set rnDate = .Range("d2:t23")
End With

View 9 Replies View Related

Insert Text To One File - Remove Text From Equivalent Column In Another File?

Aug 13, 2013

Got a slight problem; I am making a "worker-plan", where you should be able to write a name on one file and have it updated (removed) from the equivalent columns on another file automatically. Here's an example with two separate projects:

Project 1 before and after changes:
Attachment 257366
Attachment 257367

Project 2 before and after changes:
Attachment 257368
Attachment 257369

You can see here how I intended it to work. When one worker is moved from Project 1 to Project 2, that worker should also be removed from those weeks in Project 1. The previous worker from Project 2 should also be removed from those weeks (in Project 2).

Are there any formulas that can make this work automatically? All week numbers will belong to the same columns in all files.

Edit: There are 30 files that should be syncronized, not just two.. I could also gather all files into one file with sheets, instead of having seperate files.

View 2 Replies View Related

Send Keys Doesn't Send Command

May 16, 2007

We use proprietary software to connect to an oracle database. The proprietary software has its own login form. I connect to 4 or 5 different databases randomly throughout the day. I wrote a script that I thought would alleviate my login woes but it doesn't work. The login, password, and database info get sent to the form but they all end up on the login line. Instead of the tab character being sent, I get a Beep generated for each line of code that is supposed to send the tab key code. My code is below and is stored in a *.vbs file.

setwshShell =wScript.CreateObject("WScript.Shell")
wshShell.AppActivate "Title Of My Login Form"
wScript.Sleep 100
wshShell.SendKeys "My Login Name"
wScript.Sleep 500
wshShell.SendKeys "{TAB}"
wScript.Sleep 500
wshShell.SendKeys "My Password"
wScript.Sleep 500
wshShell.SendKeys "{TAB}"
wScript.Sleep 500
wshShell.SendKeys "Name of My Database"
wScript.Sleep 500
wshShell.SendKeys "{TAB}"
wScript.Sleep 500
wshShell.SendKeys "~"

View 8 Replies View Related

Send / Receive HTTP Request - Insert Text Into Cells

Jun 28, 2013

Right now when I send/receive an HTTP request, I have the text displaying in a MSG Box. I want to just have the text inserted into cell A1 instead. I know I have to alter MsgBox MyRequest.ResponseText, but anything Ive altered it to, doesn't seem to work.

Code:
Sub http()
Dim MyRequest As Object
Set MyRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
MyRequest.Open "GET", _
"Google"
' Send Request.
MyRequest.Send
'And we get this response
MsgBox MyRequest.ResponseText
End Sub

View 2 Replies View Related

Matrix - Identify Cell Content In Column For Row If Matrix Content True?

Mar 21, 2014

For a table like the one below produced for the sake of example (actual is much much bigger) I want to make it list rows that are true for a certain column for a certain variable in the matrix. So for say water terrain, which types of activity can I do i.e. swimming. Or for Offroad the activites which I can't do i.e. Run and Swim.

ActivityWaterRoadOffroad
Jog nym
Run nyn
Walk nyy
Swim ynn
y=yes
n=no
m=maybe

View 10 Replies View Related

Zip Workbook File By Using "Send To Compressed Zipped Folder"

May 8, 2009

Is it possible to save/send a workbook to compressed zipped folder by vba.
Using standard windows zip method (refer right click file option). As all users will have this feature, as i dont want to use a thrid party zip app.

So i and other users can automate zip of workbook into an email via macro.

View 2 Replies View Related

Command For Target: Send A Target Link To A File

Sep 1, 2007

i am needing to issue a dos command in excel? basically i need to send a target link to a file. i cant use a hyper link for several reasons, and this is the only way i know how to go about this.

View 2 Replies View Related

Create Matrix From A Matrix

Apr 29, 2013

Below there are all the information needed to understand my problem.

M(1 to R,1 to C): matrix with R rows and C columns [element known]

M(i,j): elements of the matrix M in position i(row)-j(column) [element known]n

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved