Dibatalkan

Write some Software

Hi,

Basically I have several folders, these folders contain several PDF files

I have created a macro to make Draft MSG files, and attach one PDF file to each MSG file.

This macro works well, so this bit is sorted.

I will post it here below.

///////////////////////////////////////////////

Public Sub NonRecursiveMethod()

Dim fso, oFolder, oSubfolder, oFile, queue As Collection

Set fso = CreateObject("[url removed, login to view]")

Set queue = New Collection

[url removed, login to view] [url removed, login to view]("C:\Test Folder")

Do While [url removed, login to view] > 0

Set oFolder = queue(1)

[url removed, login to view] 1

For Each oSubfolder In [url removed, login to view]

[url removed, login to view] oSubfolder

Next oSubfolder

x = 1

For Each oFile In [url removed, login to view]

If InStr(1, [url removed, login to view], "[url removed, login to view]", vbTextCompare) > 0 Then GoTo finish:

Set objOutlookApplication = CreateObject("[url removed, login to view]")

Set objmsg = [url removed, login to view](olMailItem)

If [url removed, login to view] = "" Then [url removed, login to view] = [url removed, login to view]

If InStr(1, [url removed, login to view], "[url removed, login to view]", vbTextCompare) = False Then [url removed, login to view] [url removed, login to view]

If [url removed, login to view] > "" Then

[url removed, login to view] = "Test MSG File - " & [url removed, login to view] & " - Part " & x & " of " & [url removed, login to view]

[url removed, login to view] ("C:\Test Folder\" & [url removed, login to view] & ".msg")

End If

x = x + 1

finish:

Next oFile

Loop

End Sub

///////////////////////////////////////////////

However, this is the part that I'm wanting to change.... But here's a short explanation as to why.

We use a third party company to upload emails onto a document storage facility.

We basically copy mail items into a 'shared' mailbox, and their software does the rest.

Normal "Received" emails, are fine... These upload perfectly.

However, my manually created 'DRAFT' emails, do not. I suspect the reason is because they are classed as draft's, and not actual 'received emails' as such.

Their system is programmed to detect the "To:" field... If it has a 'specific' email address in it, then the email will be processed and uploaded.

So, my question is, how can I make my draft emails look like it's been received... Without obviously going through the hassle of sending these emails to myself and re-saving them - There would be a lot of emails, and bandwidth involved, so I'd like to avoid that if possible.

I'd like to... if possible... do it via VBA - by changing my code above - so therefore it would be done in 'one step' not several steps.

I have included the icon of an unread received email... when it's in the mailbox.

And I've also included the icon of one of my created files (draft)... when I drop my own message into the mailbox

This is the DRAFT icon... I need VBA to change my 'draft' email to be in the same state of the first picture - basically to look like a Received email.

I tried a couple of things, such as:

ReceivedTime and SentOn - but I got Read Only errors. I don't know if this is the correct way? Or if there's another flag that I need to mark as TRUE / FALSE etc ??

I also tried changing my code to:

I was thinking, but I don't know if this is possible.... Maybe take a 'received' email - any email... and use that as a "template" ... change the contents of that msg file to match what I want, and then save it.

I don't know if that's possible though.

Please help me.

Thank You

Kemahiran: Microsoft Outlook, Kejuruteraan Perisian, Visual Basic untuk Aplikasi

Lihat lagi: write the contents, template folder icon, template company folder, queue template, please help me write an application, my address is correct, make a picture of myself, look like a copy write, icon collection, how to write a thank you email, how do you write contents, how do i write, how can write email address, how can i make icon, how can i make an icon, help me write copy, copy write email message, software write websites idea, software write book images, software write books

Tentang Majikan:
( 3 ulasan ) United Kingdom

ID Projek: #7682455