You could also do a format change on the text, converting it into the Date standard.
J2 = (TEXT(I2,"mmm d, yyyy h:mm am/pm")-TEXT(F2,"mmm d, yyyy h:mm am/pm"))*24*60*60
OCD, it’s not obsessive if you can control it…
You could do something like this...
Public Sub SaveCSV_AsXls()
Dim acpc As String, acpx As String, fac As String, xlsDir As String
Dim Well_Name_Short As String, Well_Name_Long As String
Select Case ActiveWorkbook.FileFormat
Case Is <> 6, 22, 23, 24
'MsgBox...
Outlook's base for the Body is a Word document. When calling it from inside Outlook VBA, .GetInspector calls the Item and allows for you to manipulate the Body using .WordEditor (Word VBA) rather than flipping between Word/Outlook code.
Comes in handy when you just need to do a one line entry...
Actually, I was looking for this yesterday...
Check out this site http://www.xtremevbtalk.com/showthread.php?t=150521
OCD, it’s not obsessive if you can control it…
For Jed:
Public Function GetFolder(strFolderPath As String) As MAPIFolder
'===================================================
'Sue Mosher
'http://www.outlookcode.com/d/code/getfolder.htm
' folder path needs to be something like
' "Public Folders\All Public...
You could aslo use the WordEditor function of the email itself...
Assuming that the message is displayed:
olMessage.GetInspector.WordEditor.Range(start:=0, End:=0) = wdDoc.ActiveWindow.Selection
or you may have to copy the data from the .doc first
wdDoc.Select
wdDoc.Copy...
I haven't dealt with this much either, but I do know that you can manipulate the body through the WordEditor.Range functionality.
I have some code from excel adding to the body using this:
.GetInspector.WordEditor.Range(Start:=0, End:=0).Paste
I'm not sure if this corresponds to the integer...
Not sure how familiar you are with VBA, but you can add this to a module and see if it works for you:
Public Sub CopyFromPageBreaks()
Dim vpba() As Variant, hpba() As Variant, pb() As Variant
Dim pa As String, paa As String
Dim vpbx As Integer, hpbx As Integer, x As Integer, y As...
Just a suggestion, but instead of minimizing the workbook resize it to the dimensions of the userform, then for the userform, turn off all boardering. Not exactly pretty, but should work.
OCD, it’s not obsessive if you can control it…
Item.LastModificationTime will give you the Date Time refference, but not the action... I'd need to dig further to find that one.
OCD, it’s not obsessive if you can control it…
Welcome to the forum and VBA. I'm sure you'll fall in love with makeing little things like this to optimize your life.. I know I have :)
On to the coding:
If you know that what and where you are trying to do things then this is fairly easy to do.
(Note: the deleting/shifting cells around...
A couple of suggestions:
1) For adding the string to your Body, I'd suggest something like this .GetInspector.WordEditor.Range(Start:=0, End:=0).Paste
I've found that using the Word related functions easier than HTML refferencing. Also, if you are using variable body text combined with...
I also suggest that you add Application.Calculate before turning Calc to Automatic... otherwise you will see the sheet recalculate itself after events have occured. (may not be noticable on this particular sheet, but will be evident where you have several values affected by the macro... just a...
The problem, as I read it, is that you are asking to capture a variable subject line with a variable attachment name.
You can use the Select Case .SenderName statements I wrote for adding multiple people into the Case, and add it to encompass the code you have for opeing excel/access. But...
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.