I've had this problem as well...
The thing is, the Title tag is in the Header of the document, and when you put the website in the HTMLBody element, you only get the BODY of the page....
I don't remember off hand how I handled that...
One way that might work, is to use the...
I've looked at your code, and this is what I came up with to do what you wanted. The only changes was to move some lines closer to the top of the code, and add one line.
Private Sub EMAIL_COST_AUTHORISATION_FOR_MANAGERS_APPROVAL_Click()
On Error GoTo...
From what I can see, you can use delimiters in specifications... if you build it correctly...
When you import the first one, there is an option for Other, and a box for you to put the delimiter that you want... just use the pipe '|' in that box, then it will use it as the delimiter.
Then...
sorry about that. It was in my referenced library. here is the code for the error logging function
Public Function ErrorLog(objName As String, routineName As String)
Dim db As Database
Set db = CurrentDb
Open "C:\Error.log" For Append As #1
Print #1, Format(Now, "mm/dd/yyyy, hh:nn:ss")...
Ok... here is the code that I'm using to do this. As you can see, I'm using the Selection.Find method to find the account number, and them I'm using the number of lines down from the top of the document to get the date. If anyone can suggest a better/more efficient way to do this, I'd appreciate...
Nothing is wrong with it. I've tried it, and it will print out each section, but, I can't determine what the account number is for the section that is printing. So I can't rename the file properly.
using the cut/paste method, I know that the only account number in the document is the one that I...
Thanks.
The project that I am working on is a mail merge a list. The distinguishing variable is the account number. Once the mail merge has been created, there is no way to get this number, except to search the pages for it.
I want the PDF files to be named by this account number. So, to do...
I didn't realize that... thanks for the information... however, I cannot use Adobe Acrobat for this process, since I have the completed documents to split, not a template that is creating the mail merge.
So... I'll have to go another way... I'm thinking about copying the pages in question into...
Thanks!
That does what I want... now... .PrintOut is not working like the help says it should.... I'm using
objWordDoc.PrintOut Pages:=strPages
Where strPages = "1-7"
but it is printing out the entire document.
GComyn
I'm trying to take a mail merge document with multiple "accounts" in it, and create PDF files for each account.
How would one get the page number of the selection? I am using the find method to find the words "Account No. " then putting the account number in a variable. I want to get the page...
Ahh... thanks for that.... I actually didn't use the ThanksgivingDate function at all... changing it to 'NDow(CInt(BuildYear), 11, 4, 5)'
And your change is even faster, because there isn't a function call... just a call to the array.
Thanks, and I'm going to implement that (even though I...
have you tested it out on a real query?... step through the code, and when you get to the line AFTER this one, go to the immediate window, and type '?strSQL"... then copy (or cut, whichever) the sql, and take it to a query, putting in the SQL and run it.... if it doesn't work, you should be able...
PER is used... .just not within the loops... the sMessageBody section should be within the PER loop so that it changes every time. the way it is, the message it the same for each email.
and you are right... the 'set objEmail' line probably should be inside the PER loop... probably right after...
Great code bubba100! after testing it, and looking up getobject in the help system, here is my adaptation of your code, from what I understand ckeola was asking for.
Option Compare Database
Option Explicit
Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName As...
I like it!! I would have read the file one line at a time, checking to see if the first letter is a "T", then work from there.... but I like this... it could help in other applications that I have where I do go through the file one line at a time.
BTW... your mid function needs correcting... it...
Ok.. I haven't the way that I thought... for the following code, you will need to close the spreadsheet. The code will open it itself, then find the bottom of the current list, and then go through the table as a recordset (dao) and put the fields in the cells on the excel spreadsheet.
you just...
There is a way... I remember seeing it somewhere.. but I can't remember, and there is alot of code and API calls...
I'll see if I can either find it or figure it out.
GComyn
in looking at faq705-6003, I tried to see what it would look like, so I copied it to my access database... it worked ok...
Then I went to see if there were any function on the net that would speed it up any... and I found a couple.
the Table 'tblHolidays' should already exist.
the fields are...
Ok... this is a MS Access vba function, right? Why is it a function? so you run it from a macro?
if so... it should be working... usually that error (from what I've seen) means that something else is still running, and it won't let you close the database...
if you look at the code for the...
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.