User Profile
Collapse
-
Thanks for the advice, Rabbit. Other methods of the same object work in the same code, like .EntryID and .Save. Only .SaveAs always throws error #287 about an "applicatio n defined or object defined error". -
What I've been testing is dragging and dropping an email from Outlook to a memo field on an Access form. When I drag and drop an Outlook email to the textbox, something like the following shows up:
From Subject Received Size Categories
DoNotReply@conc ursolutions.com EXTERNAL: Password Reset Request 12:41 PM 22 KB
This looks like the email header, but it should not affect the code which tries to save the Outlook...Leave a comment:
-
NeoPa, thanks for the encouragement. I have year's of experience with VBA code, but Access and Excel only. I have not done Outlook automation before. I actually do understand the code snippet I posted pretty well. OlTxt is a constant for the SaveAs method. I just don't understand why it always errors out at the SaveAs line of code. I will keep plugging away, but could use some help from someone who has actually done this.Leave a comment:
-
My goal is simply to drag and drop an email from Outlook into an Access form and save the email in Access. All I have been able to find online on the subject are code snippets. These snippets contain variables like "olTXT" that make no sense in the context of the snippet and the full code is not there. There must be some way to do it...Leave a comment:
-
Here is the condensed form of the code I am trying to run, generating Application or object defined error 287 on
the line:
olSel.item(i).S aveAs CurrentProject. Path & "\mail.txt"
The saveas method does not show up in intellisense for the olsSel.item(I) object. How does one go about saving an outlook email to Access?
Code:Private Sub MemoMemo_AfterUpdate() Dim olApp As Outlook.Application
Leave a comment:
-
what I really want to do is copy and paste an Outlook email to a form in Access and save the email to a .msg file via Access. I am not wed to the code posted. I would really like it better if there were an easier way of doing it. Does anyone have any experience with such a process? Thanks in advance for any help/advice.Leave a comment:
-
I tried debugging and the code always throws "applicatio n defined runtime error 287 at line 69
"olSel.Item(1). SaveAs strPathAndFile, olMSG"
What I am trying to do with the code is paste an outlook email to a memo field and then save the email to file. Sorry about posting all the code. I just thought it might be best to have too much than too little. By the way, the code was originally for the On Dirty...Leave a comment:
-
Drag and Drop Outlook Email to Access DB
I tried to incorporate some code I found online. I keep getting runtime error 287 when I attempt to save the email to Access. Thanks in advance for any advice.
Code:Private Sub cmdSave_Click() 'I got the guts of this sub from Remou on tek-tips.com. S/he told me I can drag and drop an 'email to a memo field, then gave me the object control code to save the file. Dim olApp As Outlook.Application
-
Twinnyfo, thanks for the response. The fields I am attempting to flatten out are multi-value fields where multiple values are stored in a single field (through some hocus-pocus that Access does behind the scene). I'll try your code. Thanks a lot.Leave a comment:
-
Assuming the form's recordsource is based on that table, me.requery should refresh the data. Is the form unbound or bound to another table?Leave a comment:
-
The input values are multiple values come from a single attachment field. These will be none, one or multiple values - 'production', 'qc', 'requested' and 'return to sender'. What I'm trying to do is combine the multiple values into a comma separated string so that if the values selected were 'production' and 'qc' for the field, the string would be 'production, qc'. I am trying to flatten out the multiple values into one string for reporting pur...Leave a comment:
-
Getting Values from Multi-Value Fields
Is there some easy way to "flatten" the multiple values from a multi-value field? I should state at the outset that I hate multi-value fields, but unfortunately they were used and I need to retrieve the multiple values from a field then concatenate them into one string. Currently I am doing something like this, but it seems to take all day.
Code:strField = "MediaReturnedReason" strMediaReturnedReason = vbNullString
-
Open Excel One Workbook Multiple Sheets from MS Access
I am trying to generate one workbook with multiple worksheets from Access but so far I have not figured out how to do this. How does one go about taking 3 separate Access DAO recordsets and generate the same workbook with a separate worksheet per RS? I imagine it can be done, but am not sure how to go about doing it. By the way, the code for generating the Workbook with one individual worksheet is working fine. I would just like to generate all worksheets... -
-
Thus far everything went smoothly. I did not experience any compatibility issues between Office 2013 and Office 2016 in installing the application, but I will wait and see if users complain about anything regarding compatibility.Leave a comment:
-
Make sure that there is a space between ] and Between. Also, try switching the date parameters around so that DateAdd("m", -1, Date()) comes before Date() in the expression. Are you sure that [Application-Last] is of date datatype?Leave a comment:
-
Backward Compatibility from Office 2016 to 2013
I have an application that I designed and developed in MS Access 2013 that I have to install in a 2016 environment tomorrow. I have never used 2016 and don't know if Access 2016 is backward compatible with 2013 and if not, what I will need to change to make it so. Do others have any insight into this? Thanks in advance. -
Escape % from VBA SQL String
How does one escape this % character from a VBA string used for searching in SQL? I get an error any time a SQL string with % is used for searching. I didn't even realize it was a reserved character in MS Access. I thought it was used in SQL Server as the Access equivalent of *, but apparently it is also used in Access. Also, what is the best way to escape single quotes within a string. Thanks in advance for responses. -
Thanks, NeoPa. That worked a treat. I didn't realize this before but Excel puts a 1 and 2 at the top left of the spreadsheet where you can expand and collapse all rows by selecting the 1 or the 2. I only had to change a few lines in your code. The line:
Rows(lngTop + 1 & ":" & lngRow - 1).Hidden = True
I changed to Rows(lngTop + 1 & ":" & lngRow - 1).Group
Thanks again for...Leave a comment:
-
Thanks for the response, NeoPa. The user interface will not work because there are thousands of distinct AcctNum's and it would take forever to group them manually. How would I go about doing this with Excel VBA? I want the first row for an AcctNum to remain visible when the other rows with the same AcctNum are collapsed. Upon clicking the plus sign, all rows for the group are displayed. So basically, I want to group the second row for an AcctNum...Leave a comment:
No activity results to display
Show More
Leave a comment: