A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook VBA Synching Problem



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 9th 11, 07:54 AM
Aldz Aldz is offline
Junior Member
 
First recorded activity at Outlookbanter: Nov 2011
Posts: 1
Default Outlook VBA Synching Problem

Good day to everyone. My boss in the office uses 2 email accounts in his pc (1 exchange server w/o OWA and 1 gmail). He asked me to make it so that he would be able to send emails using gmail to internal email in our exchange server when he's abroad. I found vba to be the answer but i'm currently stuck with a synching problem.

The way I set it up is I send a mail using gmail to internal emails BUT I have it send a BCC to myself. that way when outlook gets the email my vba script kicks in and resends everything as it is to our internal emails using the other exchange account in his outlook. This works wonderfully well but I am always stuck in (Saving Synchronization log) everytime I start to get the email and the only way I can get it is if I close outlook and open it again. Each time I send an email i'll have to reopen outlook and that would be troublesome especially for my boss. Here's the code I have used:

Sub MyRule(Item As Outlook.MailItem)

Dim olkMsg As Outlook.MailItem

Set olkMsg = Item.ReplyAll
With olkMsg
.SendUsingAccount = Application.Session.Accounts(1)
.To = Item.To
.Subject = Item.Subject
.Display
.Send
End With
Set olkMsg = Nothing

End Sub

Any input is welcome. Thank you in advance guys
Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA: Outlook appointement macro problem masani paresh[_2_] Outlook and VBA 5 February 9th 09 05:58 PM
Problem using Outlook Redemption VBA code [email protected] Outlook and VBA 8 June 7th 07 04:00 AM
Palm Synching-can U stop/filter a calndr event from synching to Pa Harriet Outlook - Calandaring 1 October 5th 06 03:24 AM
Problem running a VBA script from an Outlook rule Olivier Langlois Add-ins for Outlook 5 March 16th 06 09:03 PM
Problem hot synching Outlook 2002 with Palm Pilot Musawwir Spiegel Outlook - General Queries 2 January 28th 06 03:13 PM


All times are GMT +1. The time now is 04:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.