Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-28-2016, 12:44 PM
dwirony dwirony is offline Word VBA code not generating entire signature Windows 7 64bit Word VBA code not generating entire signature Office 2003
Advanced Beginner
Word VBA code not generating entire signature
 
Join Date: Oct 2016
Posts: 49
dwirony will become famous soon enough
Default Word VBA code not generating entire signature

Hello all,



I've looked at all kinds of threads on google but I cannot find one that addresses my problem clearly. My code generates an email from Microsoft Word and attaches the document, puts in a subject, body, all of that no problem. However, I'm trying to get outlook to put in my default signature. The bottom part of my code does that, however it doesn't completely generate my outlook signature's picture and leaves some jumbled up text instead. Could anyone help me out? Thanks in advance:

*Please note, I already have the variables in the body defined and given values, I just left it out because it's not important to what's causing this issue*

Code:
Dim OApp As Object, OMail As Object, signature As String
Set OApp = CreateObject("Outlook.Application")
Set OMail = OApp.CreateItem(0)
    With OMail
    .Display
    End With
        signature = OMail.body
    With OMail
    .to = strTo
        .Subject = strSubject
        .body = strBody1 + strBody2 + strBody3 + strBody7 + strBody8 + strBody4 + strBody5 + strBody6 & vbNewLine & signature
        .attachments.Add strAtt
        '.send
        .Display
    End With
Set OMail = Nothing
Set OApp = Nothing
Reply With Quote
  #2  
Old 12-28-2016, 03:48 PM
dwirony dwirony is offline Word VBA code not generating entire signature Windows 7 64bit Word VBA code not generating entire signature Office 2003
Advanced Beginner
Word VBA code not generating entire signature
 
Join Date: Oct 2016
Posts: 49
dwirony will become famous soon enough
Default

Figured it out. Converted everything to HTML and changed both .body to .HTMLbody
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word VBA code not generating entire signature Generating Multiple Word Docs from Master Depending on Conditions ljg713 Word VBA 6 12-09-2015 03:23 PM
Word VBA code not generating entire signature generating a number in Word John P Word 1 05-31-2012 10:29 PM
Word 2007 -- Creating Digital Signature ACalvitt Word 0 10-01-2010 11:07 AM
MS Word 2003 – Generating a ToC krazykasper Word 1 04-29-2009 02:44 PM
WORD taking up entire CPU!!! pureride Word 0 03-28-2008 09:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft