• Total Posts: 43214
  • Total Topics: 16357
  • Online Today: 3267
  • Online Ever: 51419
  • (01. January 2010., 10:27:49)

Author Topic: TIP! Sent microsoft office (word/powerpoint) documents to gmail as attachment!  (Read 5668 times)

0 Members and 2 Guests are viewing this topic.


  • SCF VIP Member
  • *****
  • Posts: 3614
  • KARMA: 157
  • Gender: Female
Back to the bad old days! If you want to send your opened Microsoft Office document to an email recipient with the "Email to" button in Office, now you can once more EVEN if you use Gmail.

I stumbled upon this information from:
Gives: (download and install - nothing to configure!)

Some more information:
Tvhgooglemapi and gmaildrafter are a pair of tools that can be used to make the
following menu entries work with google mail without having to install a
complete mailclient like Thunderbird or Outlook.
 File->Send To->Mail recipient (as attachment) (in MS Word)
 File->Send->Document as email (and the related entries in LibreOffice and
 File->Attach to email (in Acrobat Reader)
All other windows applications that use Simple MAPI MAPISendMail might work but
have not been tested.
When installing tvhgooglemapi gmaildrafter is automatically installed.
tvhgooglemapi is the part that integrates with windows and gmaildrafter actually
uploads the mail as a draft and opens the draft in your default webbrowser.
In theory gmaildrafter could also be used to implement other 'send mail'
In addition to that you also need a Java Runtime (at least version 1.6)
You can get one here: 

Imap is used to upload the mail, so you need to enable IMAP in your gmail
settings and imaps trafic has to be allowed on the network (port 993.)

If you're using multiple accounts with gmail the primary logged in account in
your browser must be the one you want to use for this application or it won't

The application can't determine the signature of the user. If you want to
include a signature in the mails created by this application you can put
it in the file %USERPROFILE%\.gmaildrafter\signatures\

When installing the required registry keys are automatically set.
In case you ever need to modify them (ie after temporarily changing the default
mailclient) you need the following settings:

"DLLPath"="C:\\Program Files (x86)\\tvhgooglemapi\\tvhgooglemapi.dll"


If a user chooses to store his login credentials these are stored in
%USERPROFILE%\.gmaildrafter . While the password is hidden an average developer
will be able to decode it, so keep these files private and do not store the
password on a computer you don't trust.

If you want to automatically attach a signature to your email you can put a file
in %USERPROFILE%\.gmaildrafter\signatures\
which contains the text in html.
The folder signatures will not be there. You have to create it yourself. Then
you need to create a html file in that folder that has as name:
matching your email address followed by .html.
If you never created a html file there's a quick writeup here:
There are many more examples if you google for 'create html file'.
Note that if you use images they will have to be online (img src="http:///... it
won't work if the image is on your local harddrive.
One detail: The file needs to contain at least one html closing tag. (</...>)
If this is not the case the program will assume it is plain text and escape all
html characters, as a result the entire signature would be on a single line in
the final mail.

If you want to compile the dll yourself you'll need Microsoft Visual C++ 2010
Express Edition
and boost ( (Other compilers might work but have not been

The Java application uses Apache Commons CLI (,
Apache Commons IO ( and Apache Commons Lang
( in addition to the java-gmail-imap
implementation of JavaMail (
The sources include a Netbeans Project, but another ide should do just fine.

The installer is made with innosetup.   

If you have a problem with the application please report them at
If your problem refers to gmail exit code 1 please create a file in
c:\windows\temp\debuggmaildrafter.txt , try to send a mail again and when there
is a popup
'Going to execute the last command in c:\windows\temp\debuggmaildrafter.txt'
before confirming this popup, open the file
c:\windows\temp\debuggmaildrafter.txt and run the last line in dos
It will most likely provide valueable information.

By default tvhgooglemapi will open the draft in a new browser tab/window. If you are using Google Chrome there is an extension that makes sure that only one tab for gmail is open (and also only one for google calendar,...) Using this extension will cause the draft to be opened in the tab where you had gmail open, some people may find that desireable. You can find it here: It's support page is here:         

Solution for log-in attempt failed from non-secure device by Google Gmail: - here you can enable POP3/IMAP access for non-secure devices (tip from:
IF you notice gmail refuses to remember the option (eg. refreshing that page will turn ON to OFF again), go to . There you'll notice the option now is ON by default and access is finally granted, without actually changing something there! Strange, but there you have it.

Last tip: You'll need to make the gmail account you want to use, the DEFAULT logged in account for gmail (in Chrome). When in doubt, log all gmail accounts off (remove them), then log the account you need to email with in as first. All done ;p

Comes in handy and I'm gonna remember it! ;-)



More information about bitcoin, altcoin & crypto in general? GO TO

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare... So why not get the real SCForum employees to help YOUR troubled computer!!! SCF Remote PC Assist

Samker's Computer Forum -


  • SCF Administrator
  • *****
  • Posts: 7528
  • KARMA: 322
  • Gender: Male
  • Whatever doesn't kill us makes us stronger.
    • - Samker's Computer Forum
Very helpful, thanks D. :thumbsup:


  • SCF Member
  • **
  • Posts: 46
  • KARMA: 0
  • Gender: Male

Samker's Computer Forum -


With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
Second Anti-Bot trap, type or simply copy-paste below (only the red letters)

Enter your email address to receive daily email with ' - Samker's Computer Forum' newest content:

Terms of Use | Privacy Policy | Advertising