• WSCecilia

    WSCecilia

    @wscecilia

    Viewing 15 replies - 16 through 30 (of 302 total)
    Author
    Replies
    • in reply to: Global Address List (Outlook/Exchange) in Access (2002) #1076463

      Yes, but it also says that you can write code using ADO or DAO to get the custom properties out of it.

      I’m just desperately trying to come up with the right code, but nothing is working.

      If I find a solution, I’ll share it. I’m still working on it.

    • in reply to: Global Address List (Outlook/Exchange) in Access (2002) #1076459

      (Edited by HansV to make URL clickable – see Help 19)

      Well, that is what is happening to me. After much searching, this article confirms what was going on: http://www.outlookcode.com/article.aspx?ID=25%5B/url%5D

      Thanks anyway!

    • in reply to: Global Address List (Outlook/Exchange) in Access (2002) #1076455

      Okay….do you know if there is any way I can get the other properties from Exchange? Then I could build a table and have it synch on a regular basis. I suppose that’s better than nothing….

      Here is some code for contacts that is in the MSKB, but I can’t figure out the magic code to change it to the global address list. I get an error every time.

      Sub ImportContactsFromOutlook()

      ‘ This code is based in Microsoft Access.

      ‘ Set up DAO objects (uses existing “tblContacts” table)
      Dim rst As DAO.Recordset
      Set rst = CurrentDb.OpenRecordset(“tblContacts”)

      ‘ Set up Outlook objects.
      Dim ol As New Outlook.Application
      Dim olns As Outlook.Namespace
      Dim cf As Outlook.MAPIFolder
      Dim c As Outlook.ContactItem
      Dim objItems As Outlook.Items
      Dim Prop As Outlook.UserProperty

      Set olns = ol.GetNamespace(“MAPI”)
      Set cf = olns.GetDefaultFolder(olFolderContacts)
      Set objItems = cf.Items
      iNumContacts = objItems.Count
      If iNumContacts 0 Then
      For i = 1 To iNumContacts
      If TypeName(objItems(i)) = “ContactItem” Then
      Set c = objItems(i)
      rst.AddNew
      rst!FirstName = c.FirstName
      rst!LastName = c.LastName
      rst!Address = c.BusinessAddressStreet
      rst!City = c.BusinessAddressCity
      rst!State = c.BusinessAddressState
      rst!Zip_Code = c.BusinessAddressPostalCode
      ‘ Custom Outlook properties would look like this:
      ‘ rst!AccessFieldName = c.UserProperties(“OutlookPropertyName”)
      rst.Update
      End If
      Next i
      rst.Close
      MsgBox “Finished.”
      Else
      MsgBox “No contacts to export.”
      End If

      End Sub

    • in reply to: Scatter Graphing–Tutorial? (Access 2002) #1065251

      I think that is ultimately the solution. I thought I had everything set up the way you said, but it just doesn’t work easily, and ultimately, I can’t get the exact charts they want. Okay, my new question: Can you suggest a tutorial on Excel graphs? The ones this person used are CLEARLY not standard, and I can’t figure out how he made them.

    • in reply to: Scatter Graphing–Tutorial? (Access 2002) #1065245

      I just had a side thought.

      Is it at all possible to put the actual Excel chart object (which I assume is an OLE object?) into Access? And then change the datasource of that somehow?

    • in reply to: Scatter Graphing–Tutorial? (Access 2002) #1065241

      Okay, I think I’ve figured out that what I need to do *isn’t* necessarily scatter graphing, it’s just the fancy name/word of the day that the supervisor wants to call it (dufus). At least that I can’t get names going across the X axis (ie. plotted?), but I can with a line column chart. Ugggh, all that has taken me since 8am this morning!

      Your mini tutorial is excellent! Thank you!!! Now I need to go further.

      What I’ve got is a list of stores, in regions, with their sales, target sales, and the number of hours they’re open in the month. It looks like this:

      Region   Store   Sales   TargetSales  Hours      Cafe
      East           A          1100      1200                200        T
      East          B           1120      1000                150        F  

      You get the picture.

      I’m trying to create a graph that compares sales to target sales, and then adds data for the number of hours on there (with a y axis on the right side scaled to the number of hours–just for the heck of it lol). To put a bigger quirk in it, I need separate graphs per region (or at least I should be able to program the data source to change with a drop down box, so I can see the different regions?). And then the original Excel graphs have two parts to them, they have a small graph grouping together stores that have cafes and then a line and then the rest are the stores that don’t have cafes.

      Now that I’ve written that all out…ugggh…I’m going back to try to work with your example to be able to change the region. I think if I can get past that…it’s a huge hurdle…I still have to do the other impossible parts, but I will feel better if I can figure out how to program the change in region….

    • in reply to: Call function in another database? (2002) #1063222

      Hah! So easy, but so hard to find.

      Perfect, that’s exactly it!!!

      I think I wanna be just like Hans when I grow up

    • in reply to: Call function in another database? (2002) #1063217

      Okay, automation is being used. I won’t be stubborn anymore.

      Now, if I want to run code…what do I use?

      If I want to run a macro, apparently I can do DoCmd.RunMacro (“MyMacro”)

      Do I need a macro for ever function I want to run this way? Or can I call the actual procedures?

    • in reply to: Call function in another database? (2002) #1063205

      Thanks, Hans.

      For some reason, I can’t refer to it in references…okay, I’ll stop being lazy and open my database

      Edit: I can’t do it in references, because I want all the action to be done in the external databases. I just want to be able to control them from one command center.

    • in reply to: Custom Toolbar in Protected Document (Word 2003) #1054242

      Sorry, I missed the nuance in what I was trying to say…you are right.

      The document that works doesn’t have the message about enabling macros in the template at all…so that’s still a difference.

      But if you don’t get the last one, where it asks if you want to save changes to the template, then it’s clearly my pc. Ugggh.

      I really do appreciate the help, and I will try to remember to say Open a new document based on a template. grin

    • in reply to: Custom Toolbar in Protected Document (Word 2003) #1054244

      Thanks! I’ll change it to automation and see if it makes a difference.

    • in reply to: Custom Toolbar in Protected Document (Word 2003) #1054202

      >>Set doc = .Documents.Add(strTemplate, , , True)

      does NOT open the template as a document. It creates a new document based on the template.<>If you still have the Word.Application object, you should not use Shell to start Word, but

      .Documents.Open(strDocName)<<

      Actually, the Word.application object is closed by then, and the user has come back to view the document he made previously. That's why I switched to shell.

      You don't need the Access portion to see this happen. Simply make a document based on the template and save it and close it. When you go back to open the document again, you'll get the message asking if you want to enable macros on the template, but the document name will properly appear at the top of the form. If you make a change in the form, upon closing you'll be prompted to save changes to the template.

      But I understand if you're busy….

      sorry

    • in reply to: Custom Toolbar in Protected Document (Word 2003) #1054199

      The Access Part:

      Here is what I’m using to create the document from the template:

      Set doc = .Documents.Add(strTemplate, , , True)

      this line follows immediately:

      doc.SaveAs strDocName

      In the case of re-opening the existing-made-from-template document (which is when I have the problem), I am using this line:

      Call Shell(“winword.exe ” & strDocName, vbMaximizedFocus)

      I am calling the same routines for opening both documents and just passing a different document or template name, so the fact that the behavior is different for the two different templates leads me to believe the problem is in the templates.

    • in reply to: Custom Toolbar in Protected Document (Word 2003) #1054196

      Exactly. I’ve got the terminology straight.

      What’s going on is I’m opening the template as a document from Access and saving it immediately in a predetermined folder with a predetermined name (made from Access data).

      The form that works properly, works properly, in that the predetermined name of the document shows up on the top of the document. When you close the form, if you’ve made no changes to the document, it closes with no fuss, and if you’ve made changes, it asks do you want to save the document.

      The form that works improperly (the attachment) DOES show the name of the document in the top, except during the Enable Macros portion, you are asked if you want to enable the macros from the .dot file. When you close the document, you are asked if you want to save changes to the .dot file.

      Does that make more sense?

      Edit: How do people attach screenshots to posts? I would post the screenshot if I could.

    • in reply to: Custom Toolbar in Protected Document (Word 2003) #1054183

      Hey, Hans…If you happen to have a spare moment….another question, same form, probably similar problem….

      So I had two of these forms that pretty much do the same thing. One of them works perfectly fine. The other one, if I open it as a document and then save it and close it…then go back to open it again, it gives me the message “are you sure you want to open your WordTemplate.dot” and on closing, “do you want to save changes to your WordTemplate.dot” instead of wanting to save to the document.

      Is there possibly something else that is a bit bonkers in the form? What should I look for?

    Viewing 15 replies - 16 through 30 (of 302 total)