Thanks - I was able to create a nested IF statement to fix my problem but I was hoping to cerate a
VBA function or Case statement to generate the description. In some cases I may have maybe 40 or 50 description's based on a code coming in on a xlsx file. That way I just need to modify or create...
The code is contained within the mail merge source (merge field).
What syntax do I use to use case to test a mail Merge field.
Each letter will have a different code to convert to text.
Doing a Mail Merge to a letter.
input field contains 1, or 2 or 3 or 4.
I want to print one of four description's based on input field code.
If 1 print "yes" if 2 print "no" if 3 print "maybe" if 4 print "whatever".
Not a simple if..then..else. VBA,Macro???
TIA Bob
Hello,
I wrote a script that opens a csv file, sets all the cell columns to auto fit, edits the cell formats of certain columns, (zip to 5 zeroes so the leading zeroes don't get dropped) and then writes the file out as an excel spreadsheet. Is that something that could fit into what you are...
Below is a .vbs file that sends an email with an attachment.
The file is really a text file with a .vbs extension generated in a program that uses tables for email address and file names for attachments but the basic vbs code is there using MAPI.
Hope this helps ~~Bob~~
Dim ToAddress
Dim...
Hey Skittle.
The script below is a file called email.vbs.
If you have windows scripting host installed (cscript)
you can just double click on this file. I use MAPI.
This script also attaches a .csv file
Dim ToAddress
Dim FromAddress
Dim MessageSubject
Dim MessageBody
Dim MessageAttachment
Dim...
when the files are concatinated instead of being (zipped zip files) there is zip file termination coding at the end of each file. So you may not be able to unzip the other files untill you can segregate the data. How big is the concatinated file?
Here is one I create dynamically with another program
to send using OUTLOOK/MAPI with an attachment.
Enjoy.
Dim ToAddress
Dim FromAddress
Dim MessageSubject
Dim MessageBody
Dim MessageAttachment
Dim ol, ns, newMail
ToAddress = "Someone@world.com"
MessageSubject = "Office Stuff"
MessageBody =...
I use this one every time I boot my machine.
next few lines are the bat file
___________________________________________________________
echo off
cls
rem Note: this file merges tif-cln.reg to re-establish the RunOnce value
start /w regedit.exe /s tif-cln.reg
exit...
I have never been able to script the windows printer dialog box with any luck which is what you need to do here to pre-populate those parameters. I have been trying to write a script to turn on and turn off duplexing from a shortcut with no luck. If I run accross something I will let ya know.
Try this out.
returncode=msgbox ("put some paper in the printer",65,"Print start")
if returncode=1 then
Set ss = CreateObject("WScript.Shell")
ss.run "command /c notepad /p c:\rjm\test.rpt ",1,TRUE
msgbox "Print is finished",64,"Print finished"
end if
set ss = nothing
Hi Malayagal,
Below is a script I use to do what you want.
On lines 42 and 43 the .numberformat= does what you want.
Line 43 c:c is a zip code that does not drop the leading
zeroes on New England states.
Enjoy Bob
Option Explicit
Const vbNormal = 1
DIM objXL, objWb, objR ' Excel object...
Yes, That should work.
The reason the :Eof thing does not work
is that :EOF when used as a goto tag
causes an imediate exit and not a branch to a :Tag.
If you change :EOF to :anything it should work
Bob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.